File opening from Custome Toolbar

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

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
 
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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top