LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default GetValue() Does Not Work

I use Visual C++ MFC 4.2.

I need to get the value of some cells like in my code below:

LPDISPATCH lpDisp = sheet.GetRange( COleVariant( "A8" ), COleVariant(
"A10" ) );

VARIANT varRet = range.GetValue();
CString sVar( varRet.bstrVal );
if( sVar.IsEmpty() ){
}

The bug is: even if A8 has already been filled with values, it still detect
the whole range as Empty.

How to fix this?

Thank you very much.





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetValue - Closed Workbook? JMay Excel Discussion (Misc queries) 2 November 3rd 08 04:40 PM
GetValue from closed workbook Wes Excel Programming 1 January 27th 08 10:21 PM
Getvalue from closed workbook Wes Excel Discussion (Misc queries) 1 January 27th 08 07:48 PM
getValue [email protected] Excel Programming 5 December 11th 06 11:32 PM
GetValue to extract data from closed files John James[_3_] Excel Programming 2 April 8th 06 11:19 AM


All times are GMT +1. The time now is 08:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"