Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
with vba; i've got an excel workbook open as readonly and i need to open the same as writable to write some data. Set XL_WB = XL_App.Workbooks.Open(FileName:=EXCEL_FILENAME, ReadOnly:=True) Set XL_WB_tmp = XL_App.Workbooks.Open(FileName:=EXCEL_FILENAME, _ ReadOnly:=False, _ IgnoreReadOnlyRecommended:=True) but i keep getting a warning message saying the file is open and that discarding the file wud result in changes being lost ... excel won't open the same file twice, one readonly and other writable? how to avoid this? i DON'T want to close the readonly file. the excel file is shared resource file. multiple users would access the file in readonly mode. atleast in theory ... please help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok this "Feature" is really there to prevent you from hurting yourself.....
but depending on what kinds of changes you want to be able to make I think you could link the read only file to another file open , change and save that file and have the changes effective in the read only file. " wrote: hi with vba; i've got an excel workbook open as readonly and i need to open the same as writable to write some data. Set XL_WB = XL_App.Workbooks.Open(FileName:=EXCEL_FILENAME, ReadOnly:=True) Set XL_WB_tmp = XL_App.Workbooks.Open(FileName:=EXCEL_FILENAME, _ ReadOnly:=False, _ IgnoreReadOnlyRecommended:=True) but i keep getting a warning message saying the file is open and that discarding the file wud result in changes being lost ... excel won't open the same file twice, one readonly and other writable? how to avoid this? i DON'T want to close the readonly file. the excel file is shared resource file. multiple users would access the file in readonly mode. atleast in theory ... please help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can only have one workbook open that has that name.
Maybe you could open another instance of excel and use that (but it kind of looks like you're close to that already). wrote: hi with vba; i've got an excel workbook open as readonly and i need to open the same as writable to write some data. Set XL_WB = XL_App.Workbooks.Open(FileName:=EXCEL_FILENAME, ReadOnly:=True) Set XL_WB_tmp = XL_App.Workbooks.Open(FileName:=EXCEL_FILENAME, _ ReadOnly:=False, _ IgnoreReadOnlyRecommended:=True) but i keep getting a warning message saying the file is open and that discarding the file wud result in changes being lost ... excel won't open the same file twice, one readonly and other writable? how to avoid this? i DON'T want to close the readonly file. the excel file is shared resource file. multiple users would access the file in readonly mode. atleast in theory ... please help -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() thanx guys i think i'll just close the readonly file, open it as writable, use it, close it, and open the file as readonly. not elegant at all but writes will happen on a less frequent basis, less than 1 in 5 i estimate. i'd rather save the memory (some computers in use are relatively old with less than 256mb ram. won't be as responsive and i'd like though. :( :) thanx again. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good Choice
Getting it right is better than getting it fast If only users understood... " wrote: thanx guys i think i'll just close the readonly file, open it as writable, use it, close it, and open the file as readonly. not elegant at all but writes will happen on a less frequent basis, less than 1 in 5 i estimate. i'd rather save the memory (some computers in use are relatively old with less than 256mb ram. won't be as responsive and i'd like though. :( :) thanx again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fileopen | Excel Programming | |||
Test fileOpen | Excel Programming | |||
Macro to run on fileopen for all workbooks | Excel Programming | |||
Using FileOpen | Excel Programming | |||
Selecting a file path in Excel VBA using FileOpen dialog | Excel Programming |