Help Needed Assigning Macro to Form Control Button in VBA

sax2play

New Member
Joined
Mar 13, 2021
Messages
16
Office Version
  1. 2016
Platform
  1. Windows
Hello All,

I have a macro that generates two form control buttons. Each form control button has its own macro assigned to it. All three macros are saved to my personal macro workbook.

My challenge is that I use the first macro to format a daily report that I need to then distribute to my team and I want the two form control button macros to automatically save in the daily workbook that is generated so my team can use the buttons. Currently I am copying the macro out of my personal workbook and adding it to the daily workbook, but I would like to automate this with VBA when I generate the daily report. Is this possible??

Thanks!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Anthony47

Well-known Member
Joined
Mar 29, 2006
Messages
2,147
The simplest way is that you create a "Daily_Report_Model.xlsm" that includes the feature you want; then Save it with "Suggested Read Only" flag
When you create your daily report you start from such "model".

To save with "Suggested Read Only", don't use the "Save" button in Menu /File /Save interface; select "Other options" (just below the file name and the file format text boxes), and you will go to the windows style File save dialog box; exapand "Tools" near the Save button, General options: here you have the "Read only recommanded" check box, to be checked before saving the file. This will prevent that your pseudo-model be modified by error.

The more sophisticated option is that you create a real template, and start from that Template to create your daily reports

Bye
 
Solution

sax2play

New Member
Joined
Mar 13, 2021
Messages
16
Office Version
  1. 2016
Platform
  1. Windows
Perfect that's exactly the solution I was looking for! Not as easy as I wanted, but it will be better in the long term. Thanks for your help!
 

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,218
Members
417,131
Latest member
Seanr19871

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
Top