Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pre-Open VBA
Hi all, I've got a spreadsheet that has a number of macros that are essential to the running of the document. However, I've noticed that when some people use the document they're are opting to not run macros when questioned on opening the file. Is there a means of either a) having a window saying something like 'You must run macros to use this spreadsheet' that comes up before the Excel 'run macros' prompt; or b) run the macros automatically and do away with the pre-open prompt. Any suggestions appreciated. TIA, SamuelT -- SamuelT ------------------------------------------------------------------------ SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501 View this thread: http://www.excelforum.com/showthread...hreadid=552165 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pre-Open VBA
You cannot get round the macro security (otherwise it would be
pointless it being there) but you CAN stop people doing anything without the macros - I would have ONE visible sheet which had a large note on it about the macros. I would have the rest of the sheets set to VERY HIDDEN and have the open event of the workbook unhide/hide the appropriate sheets - with the close event of the workbook doing the opposite. SamuelT wrote: Hi all, I've got a spreadsheet that has a number of macros that are essential to the running of the document. However, I've noticed that when some people use the document they're are opting to not run macros when questioned on opening the file. Is there a means of either a) having a window saying something like 'You must run macros to use this spreadsheet' that comes up before the Excel 'run macros' prompt; or b) run the macros automatically and do away with the pre-open prompt. Any suggestions appreciated. TIA, SamuelT -- SamuelT ------------------------------------------------------------------------ SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501 View this thread: http://www.excelforum.com/showthread...hreadid=552165 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pre-Open VBA
Samuel,
The general concept is to set all WS's xlVeryHidden, except one that has a message that says "Macros must be enabled to use this WB." And you have WB_Open code that hides that splash screen and shows the required sheets. Consequently, if macros are disabled, this WB_Open code cannot run and the user is left viewing your "Macros must be enabled .... Don't a matching WB_BeforeSave code to reverse these changes. NickHK "SamuelT" wrote in message ... Hi all, I've got a spreadsheet that has a number of macros that are essential to the running of the document. However, I've noticed that when some people use the document they're are opting to not run macros when questioned on opening the file. Is there a means of either a) having a window saying something like 'You must run macros to use this spreadsheet' that comes up before the Excel 'run macros' prompt; or b) run the macros automatically and do away with the pre-open prompt. Any suggestions appreciated. TIA, SamuelT -- SamuelT ------------------------------------------------------------------------ SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501 View this thread: http://www.excelforum.com/showthread...hreadid=552165 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ON OPEN VBA Code input incorrectly now excel sheet wont open | New Users to Excel | |||
Opening Excel, Book1 opens, remains open with other workbook open | Excel Discussion (Misc queries) | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. | Excel Programming | |||
Open email windows can't open, excel shreadsheet file .xls ? | Excel Discussion (Misc queries) |