Thread: Excel template
View Single Post
 
Old 01-12-2025, 01:24 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Here is a description (long I know but bear with me) to assist you with this macro.

Paste the macro into a regular module. If you are unfamiliar with the process ... there are instructions on the internet you can follow. You can find simple instructions on the followng webpage, scroll down a bit until you find Copy Excel VBA Code to a Regular Module
and the web page is : https://www.contextures.com/xlvba01.html

Secondly, I am presuming you probably don't have the DEVELOPER TAB showing on the menu bar at the top of the Excel workbook. You need to activate it as a means of accessing macros, creating/deleting/editing macros or adding a command button or other controls to your worksheet, form, etc.

Go to the Excel Office Button, the top left most corner of the workbook. Click on it to access the various settings. When open click on EXCEL SETTINGS. Kinda in the top middle of the small window find : Show Developer Tab In The Ribbon. Make certain this is checked as active. Now close the small window and you should see the DEVELOPER tab in the menu bar. You can open an empty workbook and play around with the menu selections to see what they do. There are also plenty of instructions on the internet related to the DEVELOPER TAB.

What you will want to do is access the developer tab, click INSERT, then select the small button icon located in the left corner of the small window that opens. Click on that small button, move your cursor to the sheet and location where you want the button and left click. You should have a command button on your sheet now.

After placing the button on the sheet another small window will open with a list of all the macros in your workbook. In this scenario you'll want to choose the macro name MoreAndMoreSheets, then click OK. The button is now connected to that macro and any time you click the button the macro will run.
Reply With Quote