Hey everyone,
I am having problems running a macro in another workbook. There are 2 workbooks, for the sake of simplicity, the "Main" workbook and "Customer" workbook. From the main workbook, the macro below is suppose to make the "customer" workbook visible, then activates it and runs the macro.
I have tried a variety of ways to make this work, and each time it fails to run the macro with warnings that it cant find it because its moved or name is wrong. Or the audbscript is out of range.
The "customer" workbook will change as each user has their own. So the name of it needs to be dynamic to ensure it runs the macro from the correct workbook.
I have a number of macros that need to be run in the same fashion, but i cant get this to work. anything you can do to help would be amazing!
Here is some info that may help you help me where the dynamic references are:
Dynamic range references located on Worksheet "Ranges"
file path: C375
workbook name: C374
I am having problems running a macro in another workbook. There are 2 workbooks, for the sake of simplicity, the "Main" workbook and "Customer" workbook. From the main workbook, the macro below is suppose to make the "customer" workbook visible, then activates it and runs the macro.
I have tried a variety of ways to make this work, and each time it fails to run the macro with warnings that it cant find it because its moved or name is wrong. Or the audbscript is out of range.
The "customer" workbook will change as each user has their own. So the name of it needs to be dynamic to ensure it runs the macro from the correct workbook.
I have a number of macros that need to be run in the same fashion, but i cant get this to work. anything you can do to help would be amazing!
Here is some info that may help you help me where the dynamic references are:
Dynamic range references located on Worksheet "Ranges"
file path: C375
workbook name: C374
Code:
sub Macro1()
Application.ScreenUpdating = False
Windows(Sheets("Ranges").Range("C374").Value & ".xlsm").Visible = True
Workbooks(Sheets("Ranges").Range("C374").Value & ".xlsm").Activate
Application.Run ("""'" & Sheets("Ranges").Range("C374").Value & ".xlsm" & "'!Border""")
end sub