Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboard Modification (A97)

    Is it possible to modify the code in the swithboard so that yoy can use arguments in the run code call? The current code is
    Case conCmdRunCode
    Application.Run rst![Argument]

    but this bombs out with an error if you add arguments

    Many Thanks

    Peter

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard Modification (A97)

    I call functions from the switchboard that change the properties on my forms so that I can use the same form for several different purposes. I've never had any problems with this, however I've never used an argument in one of these functions. I can see no reason why calling a function with an argument won't work, so this might be one solution you could try.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Switchboard Modification (A97)

    You can replace Application.Run by Eval.
    When editing the switchboard item, enter the function call as you would in VBA, for example

    MyFunc("Canada", 32)

  4. #4
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard Modification (A97)

    Thanks Hans

    Now it works like I expected it to in the first place!! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Peter

Posting Permissions

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