Results 1 to 3 of 3

Thread: Calling a function from a listbox

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Calling a function from a listbox

    Currently I use a listbox to select the function I want and then call the selected function from a SELECT CASE. This requires all functions to be listed in the SELECT CASE.

    Anyone know of a way to call any function listed in the listbox without a SELECT CASE. This would also have to include any parameters which need to be passed.

    If so, example would be appreciated.

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Location
    UK.
    Posts
    728

    Smile CallByName...

    Look into the VB CallByName function. It will allow you to do exactly what you need.

    Hope this helps
    Laterz
    Digital-X-Treme
    Contact me on MSN Messenger: [email protected]

    [VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
    / (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166
    Digital-X-Treme]

    My understanding is CallByName came out in VB6. I'm still using
    VB5, SP3. Was hoping there is an API call for this but haven't found one.

    Any suggestions for a workaround?

    Thanks
    David

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