ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open a read only file as a writable file (https://www.excelbanter.com/excel-programming/397349-open-read-only-file-writable-file.html)

the00snoopy

Open a read only file as a writable file
 
I have a file that is marked as recommended read only. I would like to have
my macro open the file alter it and save it but I can't seem to automatically
get rid of the message box when I open the file that asks if you would like
it to be read only.

I have tried
workbooks.open(file,,false)

And I have tried
Application.DisplayAlerts = False
workbooks.open(file)
Application.DisplayAlerts = True

The first method did nothing and the second method opened it as a read only
file.

Any suggestions?


Jim Rech

Open a read only file as a writable file
 
Workbooks.Open Filename:="C:\book1.xls", IgnoreReadOnlyRecommended:=True

--
Jim
"the00snoopy" wrote in message
...
|I have a file that is marked as recommended read only. I would like to have
| my macro open the file alter it and save it but I can't seem to
automatically
| get rid of the message box when I open the file that asks if you would
like
| it to be read only.
|
| I have tried
| workbooks.open(file,,false)
|
| And I have tried
| Application.DisplayAlerts = False
| workbooks.open(file)
| Application.DisplayAlerts = True
|
| The first method did nothing and the second method opened it as a read
only
| file.
|
| Any suggestions?
|




All times are GMT +1. The time now is 11:59 PM.

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