Quantcast
Channel: How do I retrieve an Excel cell value in VBA as formatted in the WorkSheet? - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by Kirk for How do I retrieve an Excel cell value in VBA as formatted...

A little late to the party, but you could always try calling up the value and number format separately, like this:Msgbox Application.WorksheetFunction.Text(Sheet.worksh.Cells(1, 1).Value,...

View Article



Answer by Jon Peltier for How do I retrieve an Excel cell value in VBA as...

Even better, if you're not sure what the format is:Msgbox Format(Sheet.worksh.Cells(1,1).Value, Sheet.worksh.Cells(1,1).NumberFormat)

View Article

Answer by Lance Roberts for How do I retrieve an Excel cell value in VBA as...

Use This:Msgbox Format(Sheet.worksh.Cells(1,1).Value, "0000")

View Article

Answer by GSerg for How do I retrieve an Excel cell value in VBA as formatted...

You are confusing a number with its textual representation.You want the .Text property, not .Value, but then, you might have problems with it.

View Article

How do I retrieve an Excel cell value in VBA as formatted in the WorkSheet?

I need to keep leading zeros on a list of numbers. The numbers are added like this (in a loop, but this is just an example using the (1, 1):Set cel = Sheet.worksh.Cells(1, 1)cel.ColumnWidth =...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images