Error 1004 : in macro

greenman

Board Regular
Joined
Mar 15, 2011
Messages
67
hi,

Can you please tell me what i have done wrong here, the macro worked fine when I had placed the button in the copying sheet, but it was copying the macro button along with it. So I moved the button to different sheet and now I keep getting this run time error. Can someone please help me?

Sheets("Expense Vs Exams").Activate
Range("A3").Select
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks for the quick reply, however if i do that then the macro does not go back into same workbook.

Windows("Expense Tracking Base.xls").Activate
 
Upvote 0
The Macro that I have basically copies list of Names from the range specified and paste each each Name into Sheet 1- A3. runs Calculation based on data in A3 and copies the sheet into new spreadsheet.

And if i use your code it does not go back into the orginal spreadsheet.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,894
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top