View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Can I mass-change macro paths of tool buttons?

I wasn't addressing how you created the existing toolbar.

I was suggesting that you won't have any further problems if you created the
toolbar using code.



Mel wrote:

Thanks, Dave, but it didn't involve code making a toolbar such as an
addin or other routine involving lines of code. It was just having
assigned a blank tool bar button to a macro residing in my
personal.xls, and then the personal.xls workbook getting a new path
when changing to a new laptop, but still using the former XLB toolbar
file. The tool button (not the macro) couldn't find the personal.xls
with that path.

David T gave me the solution to open the old personal.xls and SaveAs
it in the new XLSTART location. Worked like a charm and saved me a
bunch of time from reassigning all those tool buttons.

-Mel

On Feb 11, 11:49 am, Dave Peterson wrote:
Saved from a previous post:

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)

In xl2007, those toolbars and menu modifications will show up under the addins.

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:http://www.rondebruin.nl/ribbon.htmh...uin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
orhttp://www.rondebruin.nl/2007addin.htm



Mel wrote:

Excel v2003


I have many custom tool buttons on my tool bars that are assigned to
macros from my personal.xls. Upon getting a new computer, I restored
all those buttons using my old Excel11.xlb file and put my old
personal.xls back in the XLSTART folder. However, the path to my
personal.xls is slightly different on the new notebook.


It was:
C:\Documents and Settings\Melina\Application Data\Microsoft\Excel
\XLSTART\PERSONAL.XLS


It's now:
C:\Documents and Settings\Mel\Application Data\Microsoft\Excel\XLSTART
\PERSONAL.XLS


So, now my buttons won't work because they're looking for the old
path. I could change the path of each in the macro assignments, but is
there a way or code to mass-change the path to these macros or do I
have to change them one at a time?


Thanks for your advice.
-Mel


--

Dave Peterson


--

Dave Peterson