Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I Make Macros Available on A Floating Toolbar

I have three macros to sort data on a very large worksheet that I hav
made launchable by pushing a button on the worksheet. Because th
worksheet is so large I am consatntly moving the buttons around just t
keep them in the relevant field of view. Is there a way to put th
launch buttons onto a floating toolbar add it to one of the existin
toolbars

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I Make Macros Available on A Floating Toolbar

You can make a brand new toolbar by (1) selecting
Tools/Customize, then (2) selecting the Toolbar tab, then
(3) pressing the "New" button. Give it a name and let it
float or park it anywhere.

It's a little tricky to associate that toolbar with the
particular spreadsheet. I recommend keeping all the time,
but hiding it when it's not in use.

Putting the macro buttons on the new toolbar isn't the
most intuitive thing Microsoft came up with. (a) In the
same dialog box (Tools/Customize) select the "Commands"
tab and in the left list, select "Macros". (b) See the
Smiley face? Drag that to the new toolbar and release it.
(c) Then right click on that new smiley button. At the
bottom of the menu is "Assign Macro...". You should be
able to do that yourself and figure out how to give it a
name.


-----Original Message-----
I have three macros to sort data on a very large

worksheet that I have
made launchable by pushing a button on the worksheet.

Because the
worksheet is so large I am consatntly moving the buttons

around just to
keep them in the relevant field of view. Is there a way

to put the
launch buttons onto a floating toolbar add it to one of

the existing
toolbars?


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Can I Make Macros Available on A Floating Toolbar

Here is some sample code to create a toolbar button on the Formatting as
suggested. This code would go in the ThisWorkbok code module of the addin.

I would also add my usual corollary that to see what FaceIds are available,
visit John Walkenbach's site at http://j-walk.com/ss/excel/tips/tip67.htm

Question for you. How can it be a floating toolbar added onto another
existing toolbar.

Option Explicit

Dim sMenu As String

Private Sub Workbook_BeforeClose(Cancel As Boolean)

sMenu = "myButton"

On Error Resume Next
Application.CommandBars("Formatting").Controls(sMe nu).Delete
On Error GoTo 0
End Sub

Private Sub Workbook_Open()
Dim oCB As CommandBar
Dim oCtl As CommandBarControl
Dim newMenu As Object 'CommandBarControl
Dim ctrlButton As Object 'CommandBarControl

sMenu = "Margin Calculator"

On Error Resume Next
Application.CommandBars("Formatting").Controls(sMe nu).Delete
On Error GoTo 0

Set oCB = Application.CommandBars("Formatting")
Set oCtl = oCB.Controls.Add(Type:=msoControlButton, temporary:=True)

With oCtl
.BeginGroup = True
.Caption = sMenu
.FaceId = 197
.Style = msoButtonIconAndCaption
.OnAction = "myMacro"
End With

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"cheman " wrote in message
...
I have three macros to sort data on a very large worksheet that I have
made launchable by pushing a button on the worksheet. Because the
worksheet is so large I am consatntly moving the buttons around just to
keep them in the relevant field of view. Is there a way to put the
launch buttons onto a floating toolbar add it to one of the existing
toolbars?


---
Message posted from http://www.ExcelForum.com/



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
floating toolbar to stay put BorisS Excel Discussion (Misc queries) 2 December 3rd 06 08:47 PM
get rid euro conversion floating toolbar zero Excel Worksheet Functions 1 August 4th 05 06:21 AM
Floating Toolbar Dave Excel Discussion (Misc queries) 4 April 29th 05 04:57 PM
PDF 4.0 Floating Toolbar Darrell Excel Discussion (Misc queries) 1 February 10th 05 06:14 PM
Floating Toolbar Questions Shatin Excel Programming 2 February 22nd 04 11:55 AM


All times are GMT +1. The time now is 12:15 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"