Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With the following macro if a cell has a value of 5 in it, the macro
identifies it as a double, I would have expected it to come back as an integer. Can you tell me what I'm doing incorrectly? tia Sub DisplayCellDataAttributes() If Not RangeTools.IsRangeValid Then Exit Sub Application.ScreenUpdating = False For Each rngCell In Selection If (VarType(rngCell.Cells) = vbInteger) Then MsgBox rngCell.Address & vbCrLf & vbCrLf & " Cell DATA Format - Integer" & vbCrLf & vbCrLf & "Data: " & rngCell.Cells & vbCrLf & vbCrLf & "VarType: " & VarType(rngCell.Cells) If (VarType(rngCell.Cells) = vbLong) Then MsgBox rngCell.Address & vbCrLf & vbCrLf & " Cell DATA Format - Long" & vbCrLf & vbCrLf & "Data: " & rngCell.Cells & vbCrLf & vbCrLf & "VarType: " & VarType(rngCell.Cells) If (VarType(rngCell.Cells) = vbDouble) Then MsgBox rngCell.Address & vbCrLf & vbCrLf & " Cell DATA Format - Double" & vbCrLf & vbCrLf & "Data: " & rngCell.Cells & vbCrLf & vbCrLf & "VarType: " & VarType(rngCell.Cells) Next Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
How 2 Question | Excel Discussion (Misc queries) | |||
where can I see my question and answer? Yesterday I ask a question | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
The question is an excel question that I need to figure out howto do in excel. | Excel Worksheet Functions |