ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Textbox in a toolbar (https://www.excelbanter.com/excel-programming/392579-textbox-toolbar.html)

#DIV/0

Textbox in a toolbar
 
Is there any way to get a textbox onto a toolbar instead of a button ?
I'd like to use it as the criteria for a search. I could open a separate
form for it, that's not a problem, but I'd like to have it immediately
available at all times. I'll put buttons next to it for "search" (which will
probably just apply a filter) and "cancel".

--
David M
WinXP - Office2003 (Italian)

joel

Textbox in a toolbar
 
The text box is on the Command Control toolbar.

"#DIV/0" wrote:

Is there any way to get a textbox onto a toolbar instead of a button ?
I'd like to use it as the criteria for a search. I could open a separate
form for it, that's not a problem, but I'd like to have it immediately
available at all times. I'll put buttons next to it for "search" (which will
probably just apply a filter) and "cancel".

--
David M
WinXP - Office2003 (Italian)


#DIV/0

Textbox in a toolbar
 
Hi Joel,
That's for putting the textbox somewhere on a worksheet but not in a toolbar
that I can use on more than one sheet.
Or am I wrong ?
--
David M
WinXP - Office2003 (Italian)


"Joel" wrote:

The text box is on the Command Control toolbar.

"#DIV/0" wrote:

Is there any way to get a textbox onto a toolbar instead of a button ?
I'd like to use it as the criteria for a search. I could open a separate
form for it, that's not a problem, but I'd like to have it immediately
available at all times. I'll put buttons next to it for "search" (which will
probably just apply a filter) and "cancel".

--
David M
WinXP - Office2003 (Italian)


[email protected]

Textbox in a toolbar
 
On Jul 3, 11:22 pm, #DIV/0 wrote:
Is there any way to get a textbox onto a toolbar instead of a button ?
I'd like to use it as the criteria for a search. I could open a separate
form for it, that's not a problem, but I'd like to have it immediately
available at all times. I'll put buttons next to it for "search" (which will
probably just apply a filter) and "cancel".

--
David M
WinXP - Office2003 (Italian)


You should be able to customise a toolbar under VBA and add the
textbox.

Try this:

Sub MakeBar()
Dim customBar As CommandBar
Dim newButton As CommandBarButton
Dim newEditbtn As CommandBarComboBox
Set customBar = CommandBars.Add("Custom")
Set newEditbtn = customBar.Controls.Add(msoControlEdit)
Set newButton = customBar.Controls.Add(Type:=msoControlButton)
With newButton
.FaceId = 2
.OnAction = "MySub"
End With
customBar.Visible = True
End Sub

Cheers
David



All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com