1

For some reason when I type

Dim version
version = 1.0 

in the vb editior in excel, the editor automatically changes it to

Dim version
version = 1#

Any idea why?

Community
  • 1
  • 1
totalitarian
  • 3,606
  • 6
  • 32
  • 55

1 Answers1

4

version = 1# tells the compiler to assign a double.

The Documentation defines other suffixes:

  • 1! is a Single
  • 1@ is a Currency
  • 1 is also a double in the context of assigning to a double variable
z̫͋
  • 1,531
  • 10
  • 15