vba excel warning message

R

rmanchu

hi

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 ...

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
 
J

Jean-Guy Marcil

[email protected] was telling us:
[email protected] nous racontait que :
hi

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 ...

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 ...

Have you tried posting in an Excel group?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top