![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 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 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
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 |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
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 ] |
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Posts: 24
|
Cheers guys the third reply was just what I was looking for
thanks for the help Mathew |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|