Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboard (Access 2000)

    Hi all,

    Just wondering whether it is possible to have an item listed on a switchboard in Access and
    when you click on the item it opens and excel spreadsheet. I have had a look at the option and the only one I can that looks as if it can be used is run macro.
    That lends me to my next question, is it possible to create a macro that open a specific spreadsheet?

    Thanks Kindly,

    Kerrie <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard (Access 2000)

    Hi Kerrie,

    Of course! You'll have to use a macro for the switchboard item (I think), but you'll ultimately need code to handle the Excel Automation.

    Write your code, then use the RunCode macro to execute your code. Link your switchboard button to the macro. It should work like a charm! Post back if you need help with the code to open Excel.

    HTH <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Switchboard (Access 2000)

    As Mark says, you can create a macro that can be called from the switchboard using the RunMacro command (I'm assuming you're using Switchboard Manager here and not simply a form with static buttons). Have the macro run code that uses the Application.FollowHyperlink method to launch the spreadsheet you want to open.
    Charlotte

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Switchboard (Access 2000)

    I'm confused - why are we using a macro to run code? Why not just run the automation code directly with the RUN CODE command available in the switch board manager? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Wendell

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Switchboard (Access 2000)

    You could if you modified the switchboard table and code to accept a parameter or hardcoded the spreadsheet name and path into the code.
    Charlotte

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Switchboard (Access 2000)

    ... And also because that's the question that was originally asked. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Switchboard (Access 2000)

    Good point - though one of the things I learned the hard way <img src=/S/bash.gif border=0 alt=bash width=35 height=39> in this business is that you need to be sure the question that is being asked is the right one. Actually what I envisioned was code that would open the Common Open File dialog box so you could specify the file name at run time and then do the automation work.
    Wendell

Posting Permissions

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