Macro Button

johnnydop

New Member
Joined
Aug 13, 2009
Messages
10
I have a worksheet with two tabs. Tab1 has a macrobutton that runs a macro off of the data from Tab2. I recently created another macro within Tab2 and added a second button back on Tab1 however i dont know how to update the code so that my second macro runs off the data in Tab2 and not in Tab1, where its located. Make sense?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I have a worksheet with two tabs. Tab1 has a macrobutton that runs a macro off of the data from Tab2. I recently created another macro within Tab2 and added a second button back on Tab1 however i dont know how to update the code so that my second macro runs off the data in Tab2 and not in Tab1, where its located. Make sense?


In your new code for the second button, you probably need to Sheets("Tab2").select at the beggining so that the code will operate on Tab2.
 
Upvote 0

Forum statistics

Threads
1,215,221
Messages
6,123,699
Members
449,117
Latest member
Aaagu

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