KlayColgrove
New Member
- Joined
- Oct 19, 2018
- Messages
- 12
I am trying to use a macro that will open another workbook and press the button that is on the sheet "Instructions" then close the workbook after the task has been done. I have a list of name in column B so the action can be done on multiple worksheets. When I run my code is get the error: 400
Code:
Sub AllITMFTM()
Dim B As Range
For Each B In Range("B3", Cells(Rows.Count, "B").End(xlUp))
Workbooks.Open "D:\Documents\RM\Projects\New ITMFTM\" & B.Value & " ITMFTM Tool V1.3.xlsm"
Application.Run "'" & B.Value & "ITMFTM Tool V1.3.xlsm'!Instructions.CopyDataOver"
Workbooks(B.Value & "ITMFTM Tool V1.3.xlsm").Close SaveChanges = False
Next B
End Sub