Quote Originally Posted by berkov View Post
Code:
...
	IDispatch* pRange;
	{
		//COleVariant oleRange(szRange);
		VARIANT xx;
		xx.vt=VT_BSTR;
		xx.pcVal = _T("a1");
	
		VARIANT result;
		VariantInit(&result);
		m_hr=OLEMethod(DISPATCH_PROPERTYGET, &result, pSheet, L"Range", 1, xx);
		pRange = result.pdispVal;
	}
...
Well, Did you read the documentation about VARIANT in MSDN?
It states that for pcVal you have to use VT_BYREF | VT_I1. And if you set the type as VT_BSTR you have to set the bstrVal, not a B]pcVal[/B].

And again: why do you use such a mixture of L"...", T("...") and "..."?