Results 1 to 6 of 6

Thread: [RESOLVED] functions within app at runtime

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Resolved [RESOLVED] functions within app at runtime

    i would like some help with functions while running my application. i want my textbox1 to do the function i write in it.
    an example would be when i write in textbox1

    msgbox "It works!"

    then it open the msgbox "It Works!" from my running application.. i know i can use case but thats not what im looking for any ideas? or when i write in my textbox1 from my running app

    unload me

    it closes my application please help

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: functions within app at runtime

    anyone?

  3. #3

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: functions within app at runtime

    can i add code to a list and then select it from a list and when i click a command button it makes that code work? like an example... i write in text1 = Unload Me click commandbuttonAdd and it goes to list1 and then i select in list1 Unload Me and click commandbuttonDo and it makes the code work? so when i do select it from list1 and clikc that button it unloads the form

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: functions within app at runtime

    i noticed that is i put a space in the item from the list its not gonna work

    Public Sub UnloadMe()
    Unload Me
    End Sub

    Private Sub Form_Load()

    List1.AddItem "Hello"
    List1.AddItem "Procedure1"
    List1.AddItem "AnotherProcedure"
    List1.AddItem "Unload Me"

    it doesnt detect unload me because of the space

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: functions within app at runtime

    That's because they have to be valid procedure names and so they can't contain a space. To get around that you could create an UnloadMe sub that has Unload Me as it's one line of code.

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