我有下面的代碼似乎但是中途通過它做工精細,停止和重新啓動時,我調試的代碼。VBA代碼中途無需重新啓動的錯誤消息
當它重新啓動是不顯示任何錯誤消息。有誰知道我的代碼爲什麼這樣做?
感謝 SB
Sub ExportPICs()
If FileIsOpen("U:\FBS\PROJECTS_TEAM\MI\Sean's Projects\PICS and Benefits\Pics & Benefits upload file.xlsm") Then
MsgBox "That file's open, or doesn't exist - do something else."
Exit Sub
End If
Sheets("Post Implementation Costs").Visible = True
Sheets("Post Implementation Costs").Activate
Sheets("Post Implementation Costs").Unprotect Password:="Projects123"
Dim Tracker As String
Tracker = ThisWorkbook.Name
Dim wkbk As Excel.Workbook
Set wkbk = Workbooks.Open(Filename:= _
"U:\FBS\PROJECTS_TEAM\MI\Sean's Projects\PICS and Benefits\Pics & Benefits upload file.xlsm") '***********CODE RESTARTS HERE WITHOUT ERROR MESSAGE
Dim pics As String
pics = Dir("U:\FBS\PROJECTS_TEAM\MI\Sean's Projects\PICS and Benefits\Pics & Benefits upload file.xlsm")
Workbooks(Tracker).Activate
Sheets("Post Implementation Costs").Activate
Dim rng As Range
Dim CountTrue As Long
Set rng = Range("D16:D100")
CountTrue = Application.WorksheetFunction.CountIf(rng, "PIC")
If CountTrue > 0 Then
Rows("19:" & (CountTrue + 18)).EntireRow.Copy
End If
End Sub
如果在照片管理和共贏的開放事件的任何代碼上傳file.xlsm? – 99moorem
沒有「Pics&Benefits upload file.xlsm」目前是免費的。 –
你如何觸發此代碼? – Rory