Ah yes sorry, I have changed my attachment.
Thanks for the code above, but I still get the same error 400 when I click the button and run-time error 13 when stepping through the method.
Ah yes sorry, I have changed my attachment.
Thanks for the code above, but I still get the same error 400 when I click the button and run-time error 13 when stepping through the method.
I do not get a 400 error. I do get a 1004 error if the current directory is not the one with the template file in it.
Adding the exact folder would help.
You can no simply step into and through the macro as the Application.Caller value will cause an error.![]()
Set NewBook = Workbooks.Open(thisworkbook.path & "\Job Template.xlsm")
You can trap for that
![]()
If IsError(Application.Caller) Then MsgBox "Not called via OnAction" Exit Sub End If
That was the problem, thank you so much for the help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks