View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Assign Sub to Custom Button

Hi
the easiest thing would be:
- delete the old button (enclosed in 'on error resume next / on error
goto 0' statements to prevent error if it does not exist)
- rebuild the menu and add your new function/sub to it

--
Regards
Frank Kabel
Frankfurt, Germany

"Aggie94" schrieb im Newsbeitrag
...
How can I assign a particular Sub to a button that I create
programmatically? In other words, I have created a subroutine that

will
create a custom toolbar and buttons on the user's computer. It will

created
(if it does not exist) or be made visible when a particular workbook

is
opened and hidden when the workbook closes. How do I assign other
subroutines to those custom buttons through the programming? None of

the
buttons will be for existing Excel functions.