![]() |
![]() |
|
|||||||
| 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 |
|
Guest
Posts: n/a
|
Is there a way to automatically run a macro any time a workbook is opened?
Thanks, |
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Georgia USA
Posts: 544
|
sure put the code in thisworkbook code replace msgbox with your code
Sub auto_open() MsgBox "your text here" 'put in module will display a msg box with your text 'when workbook is opened End Sub |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Chippenham, UK
Posts: 136
|
Enter into ThisWorkbook in the VB Editor for the workbook you want the code to run.
Private Sub Workbook_Open() ' your code here or reference to your macro. End Sub
__________________
Regards, Gary Hewitt-Long |
|
|
|
|
|
#4 | |
|
Guest
Posts: n/a
|
Quote:
Is it possible that when the workbook is open the screen will automatic change in a specific color? Thanks. |
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 468
|
For example : change the color to yellow
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|