#1   Report Post  
JaneC
 
Posts: n/a
Default Macro's

Hi, Is there anyway to stop an Auto_Close macro from running when the file is
in read-only mode? Thanks, Jane
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Change the macro to test exit

Sub Auto_Close()
If Thisworkbook.Readonly Then
Exit Sub
Else
'do your stuff
End If
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JaneC" wrote in message
...
Hi, Is there anyway to stop an Auto_Close macro from running when the file

is
in read-only mode? Thanks, Jane



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
Deleting Macros Mike Excel Worksheet Functions 2 May 25th 05 04:54 PM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
sorting with macros Sorting in macros Excel Discussion (Misc queries) 1 February 1st 05 09:02 AM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
The available macros list in XL; how to suppress filename from showing KR Excel Discussion (Misc queries) 1 January 10th 05 07:20 PM


All times are GMT +1. The time now is 07:55 AM.

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"