Results 1 to 5 of 5

Thread: Just a simple question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    México, D.F.
    Posts
    64

    Talking

    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

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    32
    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

    VB 6, SQL, Java, AutoLISP, Avenue and on a good day AML

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    México, D.F.
    Posts
    64
    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

  4. #4
    Guest
    Private Type Group1
    X As Double
    End Type

    Dim grp1 as Group1


    grp1.x = 'whatever

  5. #5
    Member
    Join Date
    Aug 2000
    Posts
    32
    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
    VB 6, SQL, Java, AutoLISP, Avenue and on a good day AML

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width