Macros

  • Thread starter Thread starter Andrea
  • Start date Start date
A

Andrea

I am having a problem with some macros I made. The
problem is that I originally had them in one file, let's
call it "File 1"...then i made a new file to replace "File
1", "File 2". I copied and pasted the macros from File 1
to File 2. I aslo created menus which have macros
assigned to them, so I reassigned the macros so that they
would be coming from the File 2. Now, it works fine on my
computer, but on another computer (which is part of a
network), it opens File 1, when I try to run one of the
macros. I reassigned the macros on the other computer as
well, but it keeps on opening File 1 anyways. What can
the problem be?
Thanks for your time,
Andrea
 
On the other computer, start Excel and do not open your workbook. Go into
View, Toolbars, Customize and delete your old custom toolbar. Then you
should get the result you want when you open your workbook.

This is a chronic problem when you "attach" toolbars to workbooks. The
attached toolbar becomes part of the user's toolbar set, and it's there
regardless of whether your workbook is opened or not when Excel is started
up subsequently. So the old toolbar blocks the new one (since they have the
same names) when the new, improved workbook is opened.

The pros do not attach toolbars to workbooks. They create them with code
when the workbook opens. This is harder though and takes a bit of time and
effort to get productive with the Commandbars object.
 
Back
Top