ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cannot save macro spreadsheet due to ReadOnly = True (https://www.excelbanter.com/excel-programming/444813-cannot-save-macro-spreadsheet-due-readonly-%3D-true.html)

JingleRock[_3_]

Cannot save macro spreadsheet due to ReadOnly = True
 
First, I checked the file Attributes in Windows Explorer, and left-
clicked on Properties: all three (Read-only; Hidden; Archive) were
blank.

I then ran the following:

Sub OpenGroup1()
Application.EnableEvents = False

Application.Workbooks.Open Filename:= _
"\\HOUDATA01\Investments\Research\Shared\RATIN GS MACROS\MASTER
\Group 1 (M-Mkt) Master Macro.xlS"
'''''''''''''"\\HOUDATA01\Investments\Research\Sha red\RATINGS MACROS
\MASTER\Group 1 (M-Mkt) Master Macro.xlS", UpdateLinks:=True,
ReadOnly:=False <<<< THIS DID NOT WORK!!

If (GetAttr(ThisWorkbook.Path & "\" & ThisWorkbook.Name) And Not
vbReadOnly) Then
MsgBox "The Workbook is Not Read-Only!!", vbInformation
End If

''''''''''ThisWorkbook.ReadOnly = False <<<< THIS DID NOT WORK!!

Application.EnableEvents = True
End Sub

The MsgBox pops-up, even though "[Read-Only]" is appended to the name
of the file at the top of the opening worksheet.

Help. I cannot save edits to the workbook.

Clif McIrvin[_3_]

Cannot save macro spreadsheet due to ReadOnly = True
 
"JingleRock" wrote in message
...
First, I checked the file Attributes in Windows Explorer, and left-
clicked on Properties: all three (Read-only; Hidden; Archive) were
blank.

I then ran the following:

Sub OpenGroup1()
Application.EnableEvents = False

Application.Workbooks.Open Filename:= _
"\\HOUDATA01\Investments\Research\Shared\RATIN GS MACROS\MASTER
\Group 1 (M-Mkt) Master Macro.xlS"
'''''''''''''"\\HOUDATA01\Investments\Research\Sha red\RATINGS MACROS
\MASTER\Group 1 (M-Mkt) Master Macro.xlS", UpdateLinks:=True,
ReadOnly:=False <<<< THIS DID NOT WORK!!

If (GetAttr(ThisWorkbook.Path & "\" & ThisWorkbook.Name) And Not
vbReadOnly) Then
MsgBox "The Workbook is Not Read-Only!!", vbInformation
End If

''''''''''ThisWorkbook.ReadOnly = False <<<< THIS DID NOT WORK!!

Application.EnableEvents = True
End Sub

The MsgBox pops-up, even though "[Read-Only]" is appended to the name
of the file at the top of the opening worksheet.

Help. I cannot save edits to the workbook.



The unanswered question in my mind is why the workbook is being opened
read only.

Can you (manually) do a "Save As" ??

--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)




All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com