Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Assigning a button to a subroutine

Works like a champ!
Great resource

Thanks!

Harry-Wishes



"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.

Harry-Wishes wrote:

Hello.

I created a custom toolbar which contains a single button. No sweat.

Now, is there a programmatic way to write a subroutine that can attach this
button to another subroutine. Maybe "assign to a suubroutine" is better
terminology. I have done an exhaustive hunt on the topic but I come up short.
Below, is a snippet of code where I created an object to the toolbar and the
button. This is as far as I've been able to go.

Dim ctlToggle As Office.CommandBarButton
Set ctlToggle = CommandBars("Letter_Toolbar").Controls(1)

Help appreciated as always.

Harry-Wishes


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a subroutine with a command button JonV Excel Programming 2 July 7th 08 10:45 PM
Run a subroutine from a worksheet without button, menu, or shortcut key… qpg Excel Programming 2 June 12th 08 03:15 PM
assigning value to option button Patrick Simonds Excel Programming 2 April 4th 06 04:09 PM
Assigning macro to button d Excel Discussion (Misc queries) 0 August 22nd 05 01:40 PM
Assigning name to button Grant Reid Excel Programming 4 June 3rd 04 08:55 AM


All times are GMT +1. The time now is 04:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"