Sub open_multi1(arg1)
a1 = Selection.Row
b1 = Selection.Column
arr1 = get_data_arr("data1", , "Sheet1")
For i = fc("npp") To el(1, 50)
If arg1 = 2 Then i = b1
If Cells(a1, i) <> "" Then
sfw_path = match_arr_con(arr1, Cells(1, i), 1, 2)
sfw_path_format = path_format1(sfw_path)
'---
arr1 = Split(Cells(a1, i).text, Chr(10)) 'multi-line split to arr
For Each ii In arr1
if not inarr1(cells(1,b1),split('q_dir')) then ii = chr(34) & ii & chr(34)
word1 = "start /d " & sfw_path_format & " " & ii '此处不加Chr(34),因有些不需要,而需要的,需在单元格单独加上
cmd1 (word1)
Next
End If
If arg1 = 2 Then Exit For
Next
End Sub
function path_format1(sfw_path)
arr_tmp2 = Split(StrReverse(sfw_path), "\", 2) 'use reverse for str, to get fatherpath and filename
path_format1 = Chr(34) & StrReverse(arr_tmp2(1)) & Chr(34) & " " & StrReverse(arr_tmp2(0))
end function
Sub open_multi_all()
open_multi1 (1)
End Sub
Sub open_multi_single()
open_multi1 (2)
End Sub