oExcel.Workbooks.Open

S

Steve Clark

Excel 2003 (11.803.8036) SP2

Can anyone please tell me why my worksheet opens as "Read-Only" when I issue
the following statement(s):

Object oMissing = System.Reflection.Missing.Value;

oBook = oExcel.Workbooks.Open(openFileDialog1.FileName,
oMissing, false, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing);
 
C

Cindy M.

Hi Steve,
Excel 2003 (11.803.8036) SP2

Can anyone please tell me why my worksheet opens as "Read-Only" when I issue
the following statement(s):
Is the Read-Only attribute assigned at the Windows level? Or was the workbook
saved with the Read-Only option activated?

In either case, you can't override "Read-Only" by setting that parameter to
false when opening the document. This parameter only allows you to ADD this
"security level" when opening the document, not to remove it. The Help states
"TRUE to open in read-only mode."
Object oMissing = System.Reflection.Missing.Value;

oBook = oExcel.Workbooks.Open(openFileDialog1.FileName,
oMissing, false, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing);

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
Top