Help Needed Assigning Macro to Form Control Button in VBA

sax2play

Board Regular
Joined
Mar 13, 2021
Messages
63
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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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
 
Upvote 0
Solution
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!
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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