Results 1 to 9 of 9

Thread: [RESOLVED] Access variable by name from user input string

Threaded View

  1. #4

    Thread Starter
    Hyperactive Member deathfxu's Avatar
    Join Date
    Mar 2009
    Location
    USA
    Posts
    279

    Re: Access variable by name from user input string

    RhinoBull, I ran the code exactly as described above and it didn't work.

    vb Code:
    1. 'these declares are in a module
    2. Global test1 As String
    3. Global test2 As Integer
    4. Global test3 As String
    5.  
    6. 'this is in a commandbutton on Form1
    7. Private Sub Command1_Click()
    8. test1 = "hello world"
    9. test2 = 5
    10. test3 = "testing 1 2 3"
    11. MsgBox CallByName(Me, Text1.Text, VbGet)
    12. End Sub
    Last edited by deathfxu; Mar 11th, 2009 at 12:53 PM.

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