Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() I have a shared workbook and when I enter it sometimes its read only. Not realising I input data and then when I come to save it tells me to save as. Is there anyway you can get a box to pop up saying its read only and you have to click on ok to clear it when you open the file. -- shrek |
#2
![]() |
|||
|
|||
![]()
Hi Shrek
Here is some code I use for that purpose. Adapt to suit your needs. Sub OpenPurch() ' ' Open Purchase Ledger routine strPath = ActiveWorkbook.Path StrDrive = Left(strPath, 1) TestPLedg 'Check if file is already open If ActiveWorkbook.ReadOnly = True Then MsgBox "The Purchase Ledger file is currently in use by another user." & _ Chr(10) & "You cannot Enter any Data until you have a Write Access." _ & Chr(10) & Chr(10) & "You can use the file to VIEW data only" End If Sheets("Data Entry").Select End Sub Sub TestPLedg() On Error Resume Next Dim Opfile As String Dim wkname As String ' Opfile = strPath & "\Pledg.xls" wkname = Workbooks("Pledg.xls").Name If Len(wkname) = 0 Then Workbooks.Open filename:=Opfile End If Workbooks("Pledg.xls").Activate On Error GoTo 0 End Sub Regards Roger Govier shrek wrote: I have a shared workbook and when I enter it sometimes its read only. Not realising I input data and then when I come to save it tells me to save as. Is there anyway you can get a box to pop up saying its read only and you have to click on ok to clear it when you open the file. |
#3
![]() |
|||
|
|||
![]() Many thanks for that just one other question. Do I set this up as a new seperate macro in the workbook or set it up within the macro used to open the workbook. Thanks -- shrek |
#4
![]() |
|||
|
|||
![]()
Hi
You would need to use this in place of your macro, but change the file name and sheet names to suit your case. Regards Roger Govier shrek wrote: Many thanks for that just one other question. Do I set this up as a new seperate macro in the workbook or set it up within the macro used to open the workbook. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to write a formula that will prevent appearance ERROR MESSAGE | Excel Worksheet Functions | |||
Calculate message | Excel Discussion (Misc queries) | |||
Not getting "Locked for Editing" message | Excel Discussion (Misc queries) | |||
Macro warning (upon opening) | Excel Discussion (Misc queries) | |||
Pivot Table not valid error message when formatting data 'button'. | Excel Discussion (Misc queries) |