Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open spreadsheet


Any help much appreciated!

When a spreadsheet is opened using a button containing a macro from
another spreadsheet, why doesn't it alert the user if someone is
already in the file? It just opens a 'read-only' copy. Is there any way
around this, with code or anything?

Thank you!


--
Grace79
------------------------------------------------------------------------
Grace79's Profile: http://www.excelforum.com/member.php...o&userid=36435
View this thread: http://www.excelforum.com/showthread...hreadid=562024

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Open spreadsheet


If ThisWorkbook.ReadOnly = True Then
MsgBox "Read only"
Else
MsgBox " Read-Write"
End If


or...

If ThisWorkbook.ReadOnly = True Then
ThisWorkbook.Close
Else
MsgBox " read write"
End If




Duncan



Grace79 wrote:

Any help much appreciated!

When a spreadsheet is opened using a button containing a macro from
another spreadsheet, why doesn't it alert the user if someone is
already in the file? It just opens a 'read-only' copy. Is there any way
around this, with code or anything?

Thank you!


--
Grace79
------------------------------------------------------------------------
Grace79's Profile: http://www.excelforum.com/member.php...o&userid=36435
View this thread: http://www.excelforum.com/showthread...hreadid=562024


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Open spreadsheet

Check the readonly property of the workbook, and message it yourself

Workbooks.Open sFilename
If activeworkbook.ReadOnly Then
MsgBox "File already open, so it is readonly"
EndIf

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Grace79" wrote in
message ...

Any help much appreciated!

When a spreadsheet is opened using a button containing a macro from
another spreadsheet, why doesn't it alert the user if someone is
already in the file? It just opens a 'read-only' copy. Is there any way
around this, with code or anything?

Thank you!


--
Grace79
------------------------------------------------------------------------
Grace79's Profile:

http://www.excelforum.com/member.php...o&userid=36435
View this thread: http://www.excelforum.com/showthread...hreadid=562024



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
spreadsheet does not open Rossygirl Excel Discussion (Misc queries) 1 February 23rd 10 01:11 PM
Can't see the open spreadsheet Kris Excel Discussion (Misc queries) 6 October 12th 09 02:39 AM
Spreadsheet will not open without Excel Application being open fir Deirdre Lysaght Excel Discussion (Misc queries) 1 November 13th 07 04:11 PM
how do i do something for every spreadsheet i open? Drew Krum Excel Programming 1 May 10th 05 12:56 AM
How to open another Excel spreadsheet to copy data into current spreadsheet ? Ricky Pang Excel Programming 0 July 13th 03 01:59 PM


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