VBA module names

2077delta

Active Member
Joined
Feb 17, 2002
Messages
252
Office Version
  1. 365
Platform
  1. Windows
Is there a way to rename the VBA in Excel modules to something other than module1, module2 etc. I have tried exporting them to a different name and reimporting them, but the imported version still comes back with the same module name before I exported it.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
OF cause use the VBE and rename in the viewer.. can only be one word thou so Jack_in_the_UK is fine

Jack in the UK will fault...
 
Upvote 0
Adding to what Jack said, while in the Project Explorer of the Visual Basic Editor, select your module name (Module1 or whatever), then click on View > Properties Window (or hit F4) and you will see that module (Module1 for example) in the first field. Double click or otherwise hilite that Module1 name and type in your desired name, and close out the Properties Window, or the VBE altogether.
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,299
Members
448,885
Latest member
LokiSonic

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