Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change ReadOnly State
Hi,
is it possible to change the state of a workbook from readonly to readwrite and vice versa. The workbook is in explorer NOT set to readonly. I had this in mind, but it doesn't work (code of a excel workbook One.xls) Function Test() 'open a workbook in readonly mode Workbooks.Open "c:\Two.xls", False, True End Function Function Test2()'After some time, change the state to read/write Workbooks("Two.xls").ReadOnly = False [A1] = "Test" ActiveWorkbook.Save End Function Function Test3() 'After the update, change the state again to readonly Workbooks("Two.xls").ReadOnly = True End Function Thanks Jos Vens |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change ReadOnly State
Hi Jos
Check out the ChangeFileAccess Method in the VBA help Jos -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Jos Vens" wrote in message ... Hi, is it possible to change the state of a workbook from readonly to readwrite and vice versa. The workbook is in explorer NOT set to readonly. I had this in mind, but it doesn't work (code of a excel workbook One.xls) Function Test() 'open a workbook in readonly mode Workbooks.Open "c:\Two.xls", False, True End Function Function Test2()'After some time, change the state to read/write Workbooks("Two.xls").ReadOnly = False [A1] = "Test" ActiveWorkbook.Save End Function Function Test3() 'After the update, change the state again to readonly Workbooks("Two.xls").ReadOnly = True End Function Thanks Jos Vens |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change ReadOnly State
Thanks Ron,
this is what I needed! Jos "Ron de Bruin" schreef in bericht ... Hi Jos Check out the ChangeFileAccess Method in the VBA help Jos -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Jos Vens" wrote in message ... Hi, is it possible to change the state of a workbook from readonly to readwrite and vice versa. The workbook is in explorer NOT set to readonly. I had this in mind, but it doesn't work (code of a excel workbook One.xls) Function Test() 'open a workbook in readonly mode Workbooks.Open "c:\Two.xls", False, True End Function Function Test2()'After some time, change the state to read/write Workbooks("Two.xls").ReadOnly = False [A1] = "Test" ActiveWorkbook.Save End Function Function Test3() 'After the update, change the state again to readonly Workbooks("Two.xls").ReadOnly = True End Function Thanks Jos Vens |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
replace state names with state code abbreviations | Excel Worksheet Functions | |||
How can I show state-by-state data (as silos) on a map of NA | Charts and Charting in Excel | |||
Converting State Names to State Abbreviations | Excel Discussion (Misc queries) | |||
' Invoice' , change ' State and ZIP' to 'Prov and PC' How? | Excel Discussion (Misc queries) | |||
how to change the state of a number in a cell from negative to po. | Excel Discussion (Misc queries) |