I haven“t use the "TYPE" variables, how can i call the Currency var from my form.
Private Type FORMATS
Currency As Double
End Type
sub form_load()
Formats.currency = "123.00" ' is this correct?
end sub
Printable View
I haven“t use the "TYPE" variables, how can i call the Currency var from my form.
Private Type FORMATS
Currency As Double
End Type
sub form_load()
Formats.currency = "123.00" ' is this correct?
end sub
You need to set your Type to a variable then you can set the Currency to your value also there is a Data type in VB called Currency.
Dim myFormats as FORMATS
myFormats.Currency = 123.00
ok but my question is about other thing
This is the correct example and i don't know how to use the data type "X" on a simple form
Private Type Group1
X As Double
End Type
sub form_load()
Group1.X = "123.00" ' is this correct?
end sub
Private Type Group1
X As Double
End Type
Dim grp1 as Group1
grp1.x = 'whatever
Ok
You need to assign the type Group1 to a variable
'
'
Dim myVar as Group1
sub form_load()
''Group1.X = "123.00" ' is this correct?
' this is what you want
myVar.X = 123.00 'X is a double you can't assign a string
end sub