Why is VBA combining new macro code with current macro code?

Bret1

Board Regular
Joined
Jun 14, 2013
Messages
199
I have 2 separate macros in an Excel file. If I click on one and "edit" it will bring up only the code for that macro.
I'm trying to create a new macro in the file, but every time I try to create the new macro and view the code, it also pulls up one of the current codes with a "divider line" showing both codes together. Why is it doing this?
If I delete the "other" code from the window, it deletes the whole other macro.
I just want to create a new macro and be able to only view its code alone.
Maybe this is just a setting?
Thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I'll assume you have "Option Explicit" as the first line in your module, because you really should have it.

Place your cursor in the Option Explicit line.
In the bottom left corner of the main editor window, next to the horizontal scroll bar are two buttons. Click the left-hand button.
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,580
Members
449,174
Latest member
chandan4057

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