Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() I use VC++6.0 to create a temp excel file, and I don't want other user to modify it, I use _Workbook.ChangeFileAccess to set readonly, but it cannot help, a exception throw out, the message is "cannot find member", when I invoke ChageFileAccess function, the code is like 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
![]() |
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel not detecting that a file is currently being edited | Excel Discussion (Misc queries) | |||
Unable to create any link/hyperlinks in a particular excel file | Excel Discussion (Misc queries) | |||
No option to password protect opening an excel / word file | Excel Discussion (Misc queries) | |||
Excel startup switches | Excel Discussion (Misc queries) | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |