LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default difference between Value and Value2 and obtaining the value of acell in excel xp and later

VBA's help for .value2 describes the differences. It's useful for working with
dates and currencies.

Put a date in a cell and show the .value and .value2 properties in a msgbox.
Try it with a cell formatted for currency. (Put a value of 123.435213 in that
cell.)

From xl2003's help for .value:

Value property as it applies to the Range object.

Returns or sets the value of the specified range. Read/write Variant.

expression.Value(RangeValueDataType)
expression Required. An expression that returns a Range object.

RangeValueDataType Optional Variant. The range value data type. Can be a
xlRangeValueDataType constant.

xlRangeValueDataType can be one of these xlRangeValueDataType constants.

xlRangeValueDefault default If the specified Range object is empty, returns
the value Empty (use the IsEmpty function to test for this case). If the Range
object contains more than one cell, returns an array of values (use the IsArray
function to test for this case).

xlRangeValueMSPersistXML Returns the recordset representation of the
specified Range object in an XML format.

xlRangeValueXMLSpreadsheet Returns the values, formatting, formulas and names
of the specified Range object in the XML Spreadsheet format.

=======
I don't know what lcid is.


Sean Farrow wrote:

Hi:
What is the difference between Value and Value2 when refering to to a range
or cell.
Secondly in excel xp and later (from the excel type library) there are three
parameters, a lcid, an out parameter for the value and another parameter,
RangeDataType, what is this parameters purpose.
Any help apreciated.
Sean.


--

Dave Peterson
 
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
Obtaining values for a cell in Excel from a separate Excel file Purtec1 Excel Discussion (Misc queries) 2 October 9th 06 07:52 PM
Excel NPV initial cost in value1 and first year return in value2? Johanna Excel Worksheet Functions 3 September 12th 06 11:12 PM
Difference between .value and .value2 DaveO Excel Programming 5 August 10th 06 12:13 PM
Excel & C# NullReference Error when trying to set Range.Value2 Chuck Excel Programming 1 August 2nd 06 11:01 PM
How to dinamic cell that searches for "value1 & value2" in table. armindo Excel Discussion (Misc queries) 3 February 4th 05 10:59 PM


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

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

About Us

"It's about Microsoft Excel"