Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi Experts,
Can someone help me out. I have a spreadsheet with the code Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Range("B1").Value = "" Then MsgBox ("s.v.p. je naam invullen!") End If End Sub in ThisWorkbook. The spreadsheet must be filled in by various colleagues. On opening the file a dialog about turning the macro's off or on, I know for sure my colleagus will push the first button and will turn off the macro. Is there a way to run the macro automatically, so without the dialog. Altering the secutiry level is nog option, so I guess some additional VBA will do the trick but I really don't know how. Can someone help me out?? It would be much appreciated. Regards, Anja |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi,
You can't use macros to change macro settings, to allow otherwise would be a hackers dream. So, one approach is to hde all the sheets except a welcome sheet and unhide the work sheets when macros are enabled. If the user doesn't enable macros then they don't see the sheets they need and very quickly they learn. So you need a before close maco that hides all sheets except 1 and a workbook open macro that unhides them. If your stuck on this then post back. Mike " wrote: Hi Experts, Can someone help me out. I have a spreadsheet with the code Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Range("B1").Value = "" Then MsgBox ("s.v.p. je naam invullen!") End If End Sub in ThisWorkbook. The spreadsheet must be filled in by various colleagues. On opening the file a dialog about turning the macro's off or on, I know for sure my colleagus will push the first button and will turn off the macro. Is there a way to run the macro automatically, so without the dialog. Altering the secutiry level is nog option, so I guess some additional VBA will do the trick but I really don't know how. Can someone help me out?? It would be much appreciated. Regards, Anja |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to autoRun macro on WB open | Excel Discussion (Misc queries) | |||
Autorun Macro | Excel Discussion (Misc queries) | |||
Autorun macro | Excel Worksheet Functions | |||
MACRO AUTORUN | Excel Discussion (Misc queries) | |||
Autorun macro by date | Excel Discussion (Misc queries) |