usmc_tanks
New Member
- Joined
- Mar 19, 2018
- Messages
- 10
Hello,
I'm hoping someone can help me out with an error I'm receiving when I run my macro. I have a macro that will copy the active sheet then paste it to a new worksheet and at the same time it will name the new tab based on the value in cell B3. The problem I'm having is when I run the macro the first time a dialog box pops us saying "File not found" I click the "ok" and then I get the Run-time error '1004': Copy method of worksheet class failed but if I click end and run the macro several more times the macro works perfect, its usually when I open the file the first time.
I know the code works, I just have to go through the motions of clicking end on the run-time error before it starts to work correctly.
Any thoughts?
Thanks!
I'm hoping someone can help me out with an error I'm receiving when I run my macro. I have a macro that will copy the active sheet then paste it to a new worksheet and at the same time it will name the new tab based on the value in cell B3. The problem I'm having is when I run the macro the first time a dialog box pops us saying "File not found" I click the "ok" and then I get the Run-time error '1004': Copy method of worksheet class failed but if I click end and run the macro several more times the macro works perfect, its usually when I open the file the first time.
I know the code works, I just have to go through the motions of clicking end on the run-time error before it starts to work correctly.
Any thoughts?
Thanks!