View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Raja Raja is offline
external usenet poster
 
Posts: 70
Default Invoking Range.SpecialCells using IDispatch.Invoke

Hi,

I'm writing a method in XLL add-in for excel 2007 using the ComInterop to
call Range.SpecialCells using iDispatch.Invoke. but how I can pack the
XlCellType as Variant?
I've tried to provide the int value of the enum but it didn't work:

....
VariantInit(&lCellType);
lCellType.vt = VT_INT;
lCellType.intVal = -4123;
hr = AutoWrap(DISPATCH_METHOD,&lResult, pCellRef/*pionter to Range*/,
L"SpecialCells", &lCellType);

Any idea?

Regards,
Raja