Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Dec 2001
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboard (2003)

    Please help with syntax/methodology. 3 hours of search and yet unable to solve. I have Private Sub ProcedureX() in Module1. I set up a Switchboard. I want to click a 'switch' and RUN Private Sub ProcedureX(). I can get to Edit Switchboard Item dialog box. Input a name in Text, input Command as Run Code. In Function Name I input ProcedureX; Close, close. Click the assigned button and I get error msg. "There was an error executing the command". What am I doing wrong? ProcedureX() works fine in VBE RUN Window. Thank you. Selva.

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

    Re: Switchboard (2003)

    Private means that the procedure is known only within the module that contains it. Code in other modules (for example the module behind the switchboard form) can't see it, let alone call it. To make the procedure available throughout the database, change Private to Public.

  3. #3
    Lounger
    Join Date
    Dec 2001
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard (2003)

    Hans,
    Thank you very, very much. Works just great!
    Selva

Posting Permissions

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