Thread: Declaration?
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default Declaration?

Hi Tom

Long ! Use Long for integer numbers and Double for numbers that may or may
not contain decimals.

Dim L As Long
L = 155
MsgBox Format(L,"000000")
L = L + 1000
MsgBox Format(L,"000000")

--
HTH. Best wishes Harald
Followup to newsgroup only please

"TJF" skrev i melding
...
Hello,

I need declaration variable like this:

dim example as ???
example = 155
msgbox example
------------------------------------
And I need this result: 000155
------------------------------------
example = example + 1000
------------------------------------
And I need this result: 001155
------------------------------------

in range I cen use Selection.NumberFormat = "000000", but how its work

when
I want use this in variable.

Thanks Tom