fibonacci1101
Board Regular
- Joined
- May 23, 2013
- Messages
- 83
Hello Everyone,
Here is my code:
When I run this macro it executes 1st part of the code, then it opens exampleWB.xlsm workbook, executes Macro1 but then stops omitting 2nd part of the code. When I do it step by step after executing Application.Run ("'" & wbName & "'!" & mName) line the cursor is just blinking under this line.
Could you help me on this one?
Here is my code:
Code:
Sub example()
wbName = "exampleWB.xlsm"
sPath = "C:\Users\Username\Documents\"
wbPath = sPath & wbName
mName = "Macro1"
'[1st part of code]
Workbooks.Open (wbPath)
Application.Run ("'" & wbName & "'!" & mName)
'[2nd part of code]
End Sub
When I run this macro it executes 1st part of the code, then it opens exampleWB.xlsm workbook, executes Macro1 but then stops omitting 2nd part of the code. When I do it step by step after executing Application.Run ("'" & wbName & "'!" & mName) line the cursor is just blinking under this line.
Could you help me on this one?