ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving A Read Only File? (https://www.excelbanter.com/excel-programming/345601-saving-read-only-file.html)

TK[_3_]

Saving A Read Only File?
 
Is there a way using VBA, to save an open workbook that is read only? I
can't seem to find any info on this at all.

Thanks,

Todd



Rowan Drummond[_3_]

Saving A Read Only File?
 
How about using saveas something like:

Sub SaveMe()
Dim flname As String
Dim fullName As Variant
Dim filter As String
flname = "SaveName"
filter = "Excel Files (*.xls), *.xls"
fullName = Application.GetSaveAsFilename _
(flname, filter, , "MyFile")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
End Sub

Hope this helps
Rowan

TK wrote:
Is there a way using VBA, to save an open workbook that is read only? I
can't seem to find any info on this at all.

Thanks,

Todd




All times are GMT +1. The time now is 04:20 AM.

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