Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening as Read Only
I have set up a macro to open a file as read only, when I open it, i
does open as read only. When I close it, it asks me if I would like to save the changes although this happens you cant save the file - because it is rea only. Is there a way of getting rid of this dialog box so that the optio doesnt come up to save as and the file just closes -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening as Read Only
But you could save it as a new name. If you want make it more difficult to do
even that: Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) Me.Saved = True End Sub Under the ThisWorkbook module. You may want to put a little workaround for yourself: Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) If LCase(Application.UserName) Like "*ianripping*" Then 'nothing special Else Me.Saved = True End If End Sub This looks like a problem just waiting to happen for the developer (you???). When you spend more than a few minutes making changes and close by mistake, you'll be sorry <vbg. "ianripping <" wrote: I have set up a macro to open a file as read only, when I open it, it does open as read only. When I close it, it asks me if I would like to save the changes, although this happens you cant save the file - because it is read only. Is there a way of getting rid of this dialog box so that the option doesnt come up to save as and the file just closes? --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
file keeps opening as read only | Excel Discussion (Misc queries) | |||
Opening read-only files on a network | Excel Discussion (Misc queries) | |||
My files are opening as read only but I'm not tagging them. Help! | Excel Discussion (Misc queries) | |||
File always opening as read only | Excel Discussion (Misc queries) | |||
opening workbook as read-only | Excel Programming |