Sub Ma3333()
Dim a As String
set a=v:\program\supertsc" & "\" & Format(Date, "eemmdd)
Workbooks.Open Filename:="a - 5 & ".xls"
"a - 5 & ".xls".Activate
End Sub
另外一個問題
Sub Macro2()
for k=1 to 15
On Error Resume Next
Workbooks.Open Filename:="v:\program\supertsc" & "\" & Format(Date, "eemmdd")-k & ".xls"
next
123:
End Sub
1.假如開的檔案存在則跳到123的語法是???
2只能開到 1030401 , 接下是 1030399 不是 1030331??作者: GBKEE 時間: 2014-4-7 15:58
Dim K As Integer, B As String
For K = 0 To 0
B = "v:\program\supertsc" & "\" & 1030403 - K & "?????" & ".xls" '完整的路徑檔案名稱
[o1] = B
If Dir(B) <> "" Then
Workbooks.Open Filename:=B
end if
next