ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom Toolbar Macro - Path Name (https://www.excelbanter.com/excel-discussion-misc-queries/129267-custom-toolbar-macro-path-name.html)

Karin

Custom Toolbar Macro - Path Name
 
I've created a custom toolbar with macros attached. I figured out how to
copy the personal.xls and excel.xlb files to a co-workers computer. The
problem is that the macros have a path that leads to a directory with my name
on it. Where can I find the location of the path attached to the
macro/toolbar and change it to her path?

Dave Peterson

Custom Toolbar Macro - Path Name
 
Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

Karin wrote:

I've created a custom toolbar with macros attached. I figured out how to
copy the personal.xls and excel.xlb files to a co-workers computer. The
problem is that the macros have a path that leads to a directory with my name
on it. Where can I find the location of the path attached to the
macro/toolbar and change it to her path?


--

Dave Peterson

pa_broon74

Custom Toolbar Macro - Path Name
 
Hey.

I wouldn't mind knowing about this too, I did the same as you. Three
buttons with three corresponding macros, all they're doing on the
other computers is trying to open the spreadsheet containing the
macros and since it is already contained within the XLstart folder its
already open...

As to your problem, open up the VB editor (Tools - Macros [highlight
the macro you wish to change] - Edit) and find the line in the VB
script that tells it where the external file is and change it to the
new file path on the other user's PC. As long as you keep the same
syntax it should work ok.

Remember to keep a back up of the macro incase you make a mistake, (If
you do make a mistake the editor highlights the line of script in
yellow...)

Hope this is helpful, if any one can tell me why my macros aren't
running properly it would certainly save a PC being lobbed out off a
window :-)

Cheers.


Karin

Custom Toolbar Macro - Path Name
 
Dave, I want the toolbar to always be available...and I'm no programmer.
The macros were auto recorded. I know how to go into VB, to copy and paste
macros, to import/export modules, but to create code as you suggest is
probably beyond me. That said, I'll take a look at your links and see what I
learn.

"Dave Peterson" wrote:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

Karin wrote:

I've created a custom toolbar with macros attached. I figured out how to
copy the personal.xls and excel.xlb files to a co-workers computer. The
problem is that the macros have a path that leads to a directory with my name
on it. Where can I find the location of the path attached to the
macro/toolbar and change it to her path?


--

Dave Peterson


Karin

Custom Toolbar Macro - Path Name
 
I've been in the VB code of the macros, but there is no path called out
anywhere that I can see.

To get the toolbar macros to work, I had to set the buttons up again
(because of the path issue).

"pa_broon74" wrote:

Hey.

I wouldn't mind knowing about this too, I did the same as you. Three
buttons with three corresponding macros, all they're doing on the
other computers is trying to open the spreadsheet containing the
macros and since it is already contained within the XLstart folder its
already open...

As to your problem, open up the VB editor (Tools - Macros [highlight
the macro you wish to change] - Edit) and find the line in the VB
script that tells it where the external file is and change it to the
new file path on the other user's PC. As long as you keep the same
syntax it should work ok.

Remember to keep a back up of the macro incase you make a mistake, (If
you do make a mistake the editor highlights the line of script in
yellow...)

Hope this is helpful, if any one can tell me why my macros aren't
running properly it would certainly save a PC being lobbed out off a
window :-)

Cheers.



Karin

Custom Toolbar Macro - Path Name
 
Dave, that toolbar link makes things much more complicated, it seems to me,
than necessary. I just right click in the toolbar area, choose customize and
off I go. I then have a toolbar I can click on or off whenever I want
without writing code.

"Karin" wrote:

Dave, I want the toolbar to always be available...and I'm no programmer.
The macros were auto recorded. I know how to go into VB, to copy and paste
macros, to import/export modules, but to create code as you suggest is
probably beyond me. That said, I'll take a look at your links and see what I
learn.

"Dave Peterson" wrote:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

Karin wrote:

I've created a custom toolbar with macros attached. I figured out how to
copy the personal.xls and excel.xlb files to a co-workers computer. The
problem is that the macros have a path that leads to a directory with my name
on it. Where can I find the location of the path attached to the
macro/toolbar and change it to her path?


--

Dave Peterson


Dave Peterson

Custom Toolbar Macro - Path Name
 
It may seem that creating the toolbar is more complex--until you have to
reassign all the icons to a different location.

Karin wrote:

Dave, that toolbar link makes things much more complicated, it seems to me,
than necessary. I just right click in the toolbar area, choose customize and
off I go. I then have a toolbar I can click on or off whenever I want
without writing code.

"Karin" wrote:

Dave, I want the toolbar to always be available...and I'm no programmer.
The macros were auto recorded. I know how to go into VB, to copy and paste
macros, to import/export modules, but to create code as you suggest is
probably beyond me. That said, I'll take a look at your links and see what I
learn.

"Dave Peterson" wrote:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

Karin wrote:

I've created a custom toolbar with macros attached. I figured out how to
copy the personal.xls and excel.xlb files to a co-workers computer. The
problem is that the macros have a path that leads to a directory with my name
on it. Where can I find the location of the path attached to the
macro/toolbar and change it to her path?

--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com