@Victor, thanks a lot for your suggestion. it works!!!
@Igor, why didn't you come here earlier! :-)
Thanks a lot to all. I would probably never come out with _variant_t myself.Code:IDispatch* pRange; { _variant_t xx; xx = "a1"; VARIANT result; VariantInit(&result); m_hr=OLEMethod(DISPATCH_PROPERTYGET, &result, pSheet, L"Range", 1, xx); pRange = result.pdispVal; }




Reply With Quote
