"Can't save file because it's read-only" problem

losamfr17

Board Regular
Joined
Jun 10, 2016
Messages
149
Hi,

I want to delete a previously recorded macro. When i open the macro pop up menu from the ribbon to select and delete the macro, I get an error message saying "Can't save 'Personal2.xlsb' because the file is read-only.
I don't want to save it under a new name, i want to reduce the list of macros. Any thoughts please?

Thank you!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Check the Properties Attributes of the file in question ?

Go to File Manager / Right Click the file / Click PROPERTIES / Review the current status.

If it is set to "READ ONLY", uncheck that and save.

Hope this works for you.
 
Last edited:
Upvote 0
The Attributes section where Read Only is visible is faded away and I can't edit that part. Funny thing is read only is unchecked.
 
Upvote 0
Look through the coding within the workbook and see if you can find something like this :

Code:
[COLOR=#303336][FONT=Consolas]Workbooks[/FONT][/COLOR][COLOR=#303336][FONT=Consolas].[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]Open Filename[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]:=[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]filepath[/FONT][/COLOR][COLOR=#303336][FONT=Consolas],[/FONT][/COLOR][B][COLOR=#ff0000][FONT=Consolas]ReadOnly[/FONT][FONT=Consolas]:=[/FONT][FONT=Consolas]True[/FONT][/COLOR][/B]

Start with the module "ThisWorkbook"
 
Upvote 0
The file showed as not read only. For whatever reason, I later was able to delete the macro via the ribbon and no error message was prompted. However, when I open any random Excel file, the program also opens 3 blank worksheets "PERSONAL.xlsb", "PERSONAL2.xlsb, and "PERSONAL3.xlsb, which is really annoying. Any insight why that would be?
 
Upvote 0
There must be something in the code telling it to open those sheets.

Can you post a copy of the workbook for review ?
 
Upvote 0
I appreciate the offer. I was able to go to C:\Users\<username>\AppData\Roaming\Microsoft\Excel\XLSTART and remove the unwanted macros manually.
I recorded the macro as opposed to writing it, so I'm not sure what I did that made the code tell the sheets to open with any random file.

Option Explicit


Sub AgingReportsEdit()
'
' AgingReportsEdit Macro
' Clears 1st row, creates Age column which calculates age by day, creates Bucket column and list
'


'
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Range("D9").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$AF$15849"), , xlYes).Name _
= "Table1"
Range("Table1[#All]").Select
Columns("A:A").EntireColumn.AutoFit
Cells.Select
Cells.EntireColumn.AutoFit
Columns("E:E").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("F:F").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("Table1[[#Headers],[Column1]]").Select
ActiveCell.FormulaR1C1 = "Age"
Range("Table1[[#Headers],[Column2]]").Select
ActiveCell.FormulaR1C1 = "Bucket"
Range("E2").Select
ActiveCell.FormulaR1C1 = "=TODAY()-[@DOS]"
Columns("E:E").Select
Selection.NumberFormat = "0.00"
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-1]<45,""Current"",IF(RC[-1]<91,""45-90"",IF(RC[-1]<181,""90-180"",IF(RC[-1]<366,""181-365"",IF(RC[-1]<731,""1-2 years"",IF(RC[-1]<=1095,""2-3 years"",IF(RC[-1]>1095,""3 Years+"")))))))"
Range("F3").Select
End Sub


Sub MassInquiryMedicaid()


Rows(1).Delete
Range("B2").CurrentRegion.Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("B2").CurrentRegion, , xlYes).Name = "Mass Eligibility Inquiry"


Columns("B:B").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("Mass_Eligibility_Inquiry[[#Headers],[Inquiring Provider Name]]").Select
Selection.Copy
Range("Mass_Eligibility_Inquiry[[#Headers],[Column1]]").Select
ActiveSheet.Paste
Range("B2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=""SeniorCare Emergency Medical Services"""
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
ActiveCell.FormulaR1C1 = "Inquiring Provider Name"
Columns("B:B").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("Mass_Eligibility_Inquiry[[#Headers],[Payer Name]]").Select
Selection.Copy
Range("Mass_Eligibility_Inquiry[[#Headers],[Column1]]").Select
ActiveSheet.Paste
Range("B2").Select
Columns("A:A").ColumnWidth = 32.29
Range("B2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=""Medicaid"""
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").EntireColumn.AutoFit
Columns("D:E").Select
Range("Mass_Eligibility_Inquiry[[#Headers],[LastName]]").Activate
Selection.Replace What:="-", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("R:R").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.FormulaR1C1 = "TaxID"
Range("R3").Select
Columns("S:S").ColumnWidth = 10.14
ActiveWindow.SmallScroll Down:=27
Range("S41").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-30
Range("R41").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=202081121"
Columns("S:S").Select
Range("S16").Activate
Selection.Delete Shift:=xlToLeft
ActiveWindow.SmallScroll Down:=-36
Columns("R:R").EntireColumn.AutoFit
Range("R13").Select
Columns("G:G").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("Mass_Eligibility_Inquiry[[#Headers],[Relationship]]").Select
Selection.Copy
Range("Mass_Eligibility_Inquiry[[#Headers],[Column1]]").Select
ActiveSheet.Paste
Range("G2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=""S"""
Columns("H:H").Select
Selection.Delete Shift:=xlToLeft
Range("A1").Select


End Sub
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,688
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top