Using VBA to create VBA

Cemslie87

New Member
Joined
Mar 25, 2015
Messages
15
Hi everyone,

So i have a workbook which is a tracker for FSR visits to various sites, as well as support log to collect customer questions or issues.

Within the workbook the first thing you'd see is a homepage with buttons which will open only the required sheets for the buttons selected - to prevent inadvertent entries in the wrong sheets as they can get confusing. Obviously within these there is VBA to ensure that it makes the required page 'visible', retains the homepage tab as a visible sheet (But not selected so they could have multiple different sheets open to copy any data), and then selects the required sheet. At the top of the selected sheet there is a 'Back to Home Page' Button which will do the reverse leaving only the HomePage visible. Within the sheet it is then a simple data input table.

All fairly easy stuff for now. But to those in my office who are unfamiliar with excel, i'm a god right now, haha!

To create a new button, sheets, and VBA takes a novice (me) a good 15 minutes to do this including QA. For some of the older, less excel based users in my team who use this, i have created a 'noddy guide' on how to create a new page in the event they dare to try it when i'm not here. Call it future proofing.

But i'm wondering if it is possible to automate this process with a 'Create New Support log' button which will;
Create a new sheet in a particular format (colours, borders, etc)
Create a new button on the homepage, with a message button asking for the name of the button and for the sub name,
Copy a 'Template' line of vba and paste it completing the required details in it,
Applying the open_sub and Close_sub names to the Open_All and Close_All subs.

Its a little database-y, but until i can learn enough to create this in a DB then excel is what i know enough of just now.

Happy to answer any further info questions if required :)

Thanks one and all for any responses.

C
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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