View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Macro button not appearing when workbook opened?

Simon,

You didn't answer my question...
The code you posted does not show any dots in front of the
code lines within the With statement.

"CommandBars" will not work in Class modules.
You must use "Application.CommandBars".

The Auto_Open command should be used in a standard
module not a Class module (ThisWorkbook is a class module).

Regards,
Jim Cone
San Francisco, USA



"Simon Lloyd" wrote in message
Hi and thanks for replying,

The code doesnt break normally, when the workbook opens it goes through
the auto open but then stops with a Runtime 5 fault the only button
available on the pop up box to click is the End button, the code is
stopping at the last button in my Auto Open
CommandBars("matrix").Controls("Area Leaders").OnAction ="ALbutt"

if i open the workbook on a computer that has never opened the workbook
before the (i.e before the extra button was added) then all the buttons
i created appear, but if i open the workbook on a computer that has
opened it it comes up with the runtime error and does not create the
button but all other buttons are there as normal and operate fine.

Its Driving me mad because i cant get round it and i keep getting phone
callssaying the program isnt working properly so any guidance or help
you can give will be greatly appreciated.

Regards,
Simon