Basic Macro Question

Matty2470

New Member
Joined
Mar 7, 2002
Messages
24
I want to put some macro to run when excel opens.

How do I do this. Where is the on open property for the worbook?

Sorry to trouble you with this question
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hiya,

I'm not 100% sure on this because I've got a weird Network installation of Excel and cannot get my personal.xls to work, but try putting the code you want to run in the ThisWorkbook bit of your personal.xls, i.e.

Private Sub Workbook_Open()
MsgBox ("Excel has Started!")
End Sub

(The personal.xls will reside somewhere like C:program filesmicrosoft officexlstart)

Rgds
AJ
 
Upvote 0
Hi
I think if you name the macro Auto_Open, it will run when the book is opened...
If no, right-click on the Excel icon in the upper left of your screen and choose view code. This is the workbook code class modul.
Two dropdowns at the top of the page.
The one on the left needs to say workbook,
choose Workbook open on the right.
Call your macro from the sub by typing in the macro name or typing:
Call MacroName
Tom
 
Upvote 0
Right click your sheet tabs and select View Code. On the left hand side of the VBA screen, double click This Workbook

From the two dropdown boxes above the blank VB page choose Workbook from the left one and Open from the right one

Audiojoe
Might as well face it, I'm addicted to love

P.S: Although I was 3rd to get my reply up for this, I'm leaving this one on just to show I can do some things right
Real love with soap and three girls etc...
This message was edited by Audiojoe on 2002-04-04 07:54
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,185
Members
448,872
Latest member
lcaw

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