+ Reply to Thread
Results 1 to 2 of 2

File opening from Custome Toolbar

  1. #1
    Wayne
    Guest

    File opening from Custome Toolbar

    I would like to have a toolbar with seven buttons, each
    of which would open a specific Excel file. I would use
    fully qualified path names e.g., "\\FIL-NW02-06
    \MPTTechTeamLeaders\8_Tech_Team_Scorecard\Reddy Team
    Scorecards\[2005_Define_Scorecard_Hixson.xls"

    The only difference in any of the path names is the last
    part e.g., the Hixson in this one. So is there a way to
    set a module-level string equal to the first part of the
    path and append a different "end part" e.g. Hixson" to
    get the full path name, depending on the button pushed?
    I'm still new to this but having fun learning.

    Thanks

    Wayne

  2. #2
    K Dales
    Guest

    RE: File opening from Custome Toolbar

    To do what you want, just declare the variable for the common part of the
    path as a constant in the declarations section of the module (before any subs
    or functions):
    Const MyFilePath as String =
    "FIL-NW02-06\MPTTechTeamLeaders\8_Tech_Team_Scorecard\Reddy Team
    Scorecards\[2005_Define_Scorecard_"
    Then for each of your buttons, just append the rest; e.g. in the code for
    your "Hixon" button;
    SavePath = MyFilePath + "Hixon.xls"

    "Wayne" wrote:

    > I would like to have a toolbar with seven buttons, each
    > of which would open a specific Excel file. I would use
    > fully qualified path names e.g., "\\FIL-NW02-06
    > \MPTTechTeamLeaders\8_Tech_Team_Scorecard\Reddy Team
    > Scorecards\[2005_Define_Scorecard_Hixson.xls"
    >
    > The only difference in any of the path names is the last
    > part e.g., the Hixson in this one. So is there a way to
    > set a module-level string equal to the first part of the
    > path and append a different "end part" e.g. Hixson" to
    > get the full path name, depending on the button pushed?
    > I'm still new to this but having fun learning.
    >
    > Thanks
    >
    > Wayne
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1