Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i would like the macro to run automatically as soon as thw workbook i
open. this is to prevent ppl from disabling the workbook. how do i d so -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Shirley,
Here is the code you need. Rob Van Gelder posted it in a reply to myself in the post below yours Private Sub Workbook_Open( 'code you want to run when they open the spreadshee End Su |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Shirley,
To expand on the disabling bit, here is a response I posted yesterday. Usual way is to put a message on one sheet that says that the user must run with Macros enabled. Hide all the other sheets (use xlVeryHidden so that it cannot be changed in Excel). In the Workbook_Open event add some code to hide that sheet, and un hide all others. If they don't enable macros, your macro won't fire, so they only see the warning sheet. Add code in the Before_Close event to unhide the warning sheet, and very hide the others It isn't foolproof, but it should help. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Neil" wrote in message ... Shirley, Here is the code you need. Rob Van Gelder posted it in a reply to myself in the post below yours. Private Sub Workbook_Open() 'code you want to run when they open the spreadsheet End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you do the following using VBA macro automatically? | Excel Discussion (Misc queries) | |||
Macro to automatically run | Excel Discussion (Misc queries) | |||
Run macro automatically. | New Users to Excel | |||
Automatically run Macro | Excel Discussion (Misc queries) | |||
macro to run automatically | Excel Programming |