Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Adding a text box to a toolbar

Try something like this:

Const AppTag As String = "TempBar"

Sub CreateBarWithTB()
Dim CB As CommandBar
Dim TB As CommandBarControl

DeleteBar

Set CB = Application.CommandBars.Add(AppTag)

Set TB = CB.Controls.Add(msoControlEdit)

CB.Visible = True
End Sub

Sub DeleteBar()
On Error Resume Next
Application.CommandBars(AppTag).Delete
End Sub


--
Regards,

Juan Pablo González

"achmed" wrote in message
...
Good morning. I use VBA in Excel XP with Windows 2000.

Can someone please show me example code for adding a plain textbox to a

toolbar? I cannot find this in help.

Thank you.



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
Adding a macro to a toolbar Dudley Excel Discussion (Misc queries) 7 March 17th 09 03:42 PM
Getting Duplicate items when adding to toolbar djmillis Excel Discussion (Misc queries) 0 May 9th 08 02:43 PM
Adding Customised Buttons to a toolbar GLT Excel Discussion (Misc queries) 6 March 22nd 06 06:32 AM
Adding a toolbar on a form John Riley Excel Programming 1 February 20th 04 09:09 PM
Adding Toolbar at startup Brian McGuire[_2_] Excel Programming 2 December 9th 03 05:01 PM


All times are GMT +1. The time now is 06:41 PM.

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

About Us

"It's about Microsoft Excel"