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: 35
Default DataType Property

The Excel HELP file demonstrates how to test for data types in a PivotTABLE:

Set pvtTable = Worksheets("Sheet1").Range("A3").PivotTable
Select Case pvtTable.PivotFields("ORDER_DATE").DataType
Case Is = xlText
MsgBox "The field contains text data"
Case Is = xlNumber
MsgBox "The field contains numeric data"
Case Is = xlDate
MsgBox "The field contains date data"
End Select

How do I test for DataTypes in a cell in a regular worksheet (my crude
attempts are)

msgbox ActiveCell.DataType
msgbox Range("A1").DataType

 
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
Save as a dbf file changes datatype araki Excel Discussion (Misc queries) 0 November 18th 05 10:42 PM
listbox default datatype grinning_crow[_6_] Excel Programming 0 September 1st 04 11:58 AM
need help- SUB: DATATYPE FOR A CELL.. monika Excel Programming 1 February 13th 04 02:13 PM
DataType Conversion AsimKhaliq Excel Programming 0 January 21st 04 12:40 AM
How do I change the datatype of a cell? Casper Hornstrup Excel Programming 5 December 10th 03 01:46 PM


All times are GMT +1. The time now is 10:17 PM.

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"