Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ON OPEN VBA Code input incorrectly now excel sheet wont open mmartin New Users to Excel 1 February 16th 11 11:33 PM
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. san Excel Programming 1 January 3rd 06 03:22 AM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM


All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"