Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable Macro on real only option


Hi, I want to know how can I disable a macro if the workbook is open in
read only option, because I dont want that someone execute a macro that
changes cant be save after.


Thanks

Renato


--
Renato8
------------------------------------------------------------------------
Renato8's Profile: http://www.excelforum.com/member.php...o&userid=30604
View this thread: http://www.excelforum.com/showthread...hreadid=537275

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Disable Macro on real only option

easier might be to have your macro check the status and just quit if the
workbook is read only.

if activeworkbook.ReadOnly then exit sub

or if the macro is in the workbook

if thisworkbook.ReadOnly then exit sub

--
Regards,
Tom Ogilvy


"Renato8" wrote:


Hi, I want to know how can I disable a macro if the workbook is open in
read only option, because I dont want that someone execute a macro that
changes cant be save after.


Thanks

Renato


--
Renato8
------------------------------------------------------------------------
Renato8's Profile: http://www.excelforum.com/member.php...o&userid=30604
View this thread: http://www.excelforum.com/showthread...hreadid=537275


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
Save-As Option Disable Salman Excel Worksheet Functions 0 January 9th 07 12:09 PM
Disable Option in Como Box ExcelMonkey Excel Programming 2 October 17th 05 08:06 AM
How to disable smoothline option. Sureshkrishnan Charts and Charting in Excel 2 October 15th 05 01:47 PM
Disable "Save As" Option Andy T Excel Discussion (Misc queries) 1 December 10th 04 10:23 AM
Disable Macro Option Pete Excel Programming 2 April 14th 04 09:14 PM


All times are GMT +1. The time now is 05:54 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"