![]() |
read vs write file
If I open a file with macros... it could had been opened as read only or as
read/write.... Then how do I check with a macro if it was opened as read only or as read/write? |
read vs write file
bReadOnly = wb.ReadOnly
where wb refers to the workbook you want to know about Regards, Peter T "Alberto Ast" wrote in message ... If I open a file with macros... it could had been opened as read only or as read/write.... Then how do I check with a macro if it was opened as read only or as read/write? |
read vs write file
Will the statement read as follows?
if wb.ReadOnly then wb.Close False else wb.Close True end if "Peter T" wrote: bReadOnly = wb.ReadOnly where wb refers to the workbook you want to know about Regards, Peter T "Alberto Ast" wrote in message ... If I open a file with macros... it could had been opened as read only or as read/write.... Then how do I check with a macro if it was opened as read only or as read/write? . |
read vs write file
Yes..provided you have the wb object...
Dim wb as workbook Set wb = ActiveWorkbook If this post helps click Yes --------------- Jacob Skaria "Alberto Ast" wrote: Will the statement read as follows? if wb.ReadOnly then wb.Close False else wb.Close True end if "Peter T" wrote: bReadOnly = wb.ReadOnly where wb refers to the workbook you want to know about Regards, Peter T "Alberto Ast" wrote in message ... If I open a file with macros... it could had been opened as read only or as read/write.... Then how do I check with a macro if it was opened as read only or as read/write? . |
All times are GMT +1. The time now is 11:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com