Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I use VC++6.0 to create a temp excel file, and I don't want other use to modify it, I use _Workbook.ChangeFileAccess to set readonly, but i cannot help, a exception throw out, the message is "cannot fin member", when I invoke ChageFileAccess function, the code is lik this: COleVariant vtOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR),vtTrue((short)TRUE),vtFalse((short)FALSE ); _Application *ExcelApp = new _Application; ExcelApp-CreateDispatch("excel.application"); //ÉèÖÃΪÏÔʾ ExcelApp-SetVisible(TRUE); //µÃµ½WorkBooks Workbooks ExcelBook=ExcelApp-GetWorkbooks(); Sheets ExcelSheet=ExcelBook.Add(vtOptional); _Workbook workBook; _Worksheet workSheet; Range range; workBook.AttachDispatch(ExcelApp-GetApplication()); ExcelSheet=workBook.GetSheets(); //////////////////////////////////////////// workSheet=ExcelSheet.GetItem(COleVariant((short)1) ); workSheet.Activate(); can anyone help me? Thanks -- gowinderPosted via http://www.officehelp.in - <a href="http://www.officehelp.in">Microsoft Office Software</a> |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Please help me -- gowinderPosted via http://www.officehelp.in - <a href="http://www.officehelp.in">Microsoft Office Software</a> |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel thinks a file is ReadOnly but it is not. How to fix? | Excel Discussion (Misc queries) | |||
Changing file from readonly | Excel Discussion (Misc queries) | |||
How do I use VC++6.0 to protect a excel file to readonly | Excel Worksheet Functions | |||
Closing ReadOnly file using VBA | Excel Programming | |||
Opening a ReadOnly file in Excel VBA | Excel Programming |