Running Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guest
Hello folks
Does anyone how to run the macro automatically?
For example once I have recorded the macro, how can I set up the macro. So when the file can run the macro automatically when it is loaded to the excel?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
To run it automatically on opening the workbook, go into the VBA editor, double-click on the ThisWorkbook entry in the Project Explorer pane and change the left-hand dropdown in the right pane from General to Workbook. This will create the Private Sub Workbook_Open() sub for you. Type in Call and the name of your macro (eg if your macro was called MyMacro, the code would look like this: -

Private Sub Workbook_Open()

Call MyMacro

End Sub


HTH.
This message was edited by Mudface on 2002-03-01 05:50
 
Upvote 0

Forum statistics

Threads
1,223,350
Messages
6,171,590
Members
452,412
Latest member
sprichwort

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