Getting macros to auto run

crjaynes1

New Member
Joined
Jun 26, 2011
Messages
3
Hi,
I am fairly new to VBA and macros in Excel. I am writing a program to help keep automate a process in our office. I am using a series of input screens. I tried to keep in mind that everyone may not use 21 inch monitors so tried to keep the "real estate" input area to a minimum. Unfortunately, on some smaller screens the input area bleeds off the screen. I have a macro that will size these input areas to fit whatever screen size is viewing the program, but apart from attaching this macro to a button and saying click here to resize, is there a way to have this macro automatically run when this workbook is opened. I have copied it into the personal.xlsb workbook but don't know how to tell it to aytomatically run. Any ideas if this is possible.
Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
jasonb75, got it to work, took a little effort, didn't realize that the code had to be copied into the thisworkbook module in the VBA editor, I was initially just saving it as a macro in workbook. Thanks, that is a big help being able to resize the different input pages depending on who opens. I opened on 17 inch screen, everything fit, sent to my IT guy, he opened on 15 inch screen, everything fit. Thanks again.
Randy
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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