TextBox dentro de CommandBars

28/03/2005 - 00:41 por SG Web Design - Sergio Gattelet | Informe spam
Hola Grupo

Quisiera dentro de una barra de herramientas poder tener un textbox para
introducir texto por el usuario. Es esto posible?

Saludos,
Sergio

Preguntas similare

Leer las respuestas

#1 Fernando Arroyo
28/03/2005 - 09:17 | Informe spam
"SG Web Design - Sergio Gattelet" escribió en el mensaje news:
Mostrar la cita
Yo no lo he usado nunca, pero hay un tipo de control msoControlEdit el cual pienso que se comporta de forma parecida a un cuadro de texto.
Un saludo.


Fernando Arroyo
MS MVP - Excel
#2 Fernando Arroyo
28/03/2005 - 09:52 | Informe spam
Con el siguiente código puedes ver un ejemplo:


Sub Prueba()
Dim cbMiBarra As Office.CommandBar
Dim ceMiControlEdit As Office.CommandBarComboBox

Set cbMiBarra = CommandBars.Add("MiBarra", msoBarPopup, False, True)
Set ceMiControlEdit = cbMiBarra.Controls.Add(msoControlEdit, , , , temporary:=True)

With ceMiControlEdit
.Caption = "MiControl"
.Text = "Texto por defecto" 'No es necesario
.Width = 250
End With

cbMiBarra.ShowPopup
MsgBox "Lo introducido en el cuadro de texto es: " & ceMiControlEdit.Text

CommandBars("MiBarra").Delete

Set ceMiControlEdit = Nothing
Set cbMiBarra = Nothing
End Sub


Un saludo.


Fernando Arroyo
MS MVP - Excel
#3 SG Web Design - Sergio Gattelet
28/03/2005 - 14:02 | Informe spam
Gracias Fernando, lo probare y luego te respondo como andubo. Gracias por tu
tiempo!

Sergio

"Fernando Arroyo" escribió en el mensaje
news:
Con el siguiente código puedes ver un ejemplo:


Sub Prueba()
Dim cbMiBarra As Office.CommandBar
Dim ceMiControlEdit As Office.CommandBarComboBox

Set cbMiBarra = CommandBars.Add("MiBarra", msoBarPopup, False, True)
Set ceMiControlEdit = cbMiBarra.Controls.Add(msoControlEdit, , , ,
temporary:=True)

With ceMiControlEdit
.Caption = "MiControl"
.Text = "Texto por defecto" 'No es necesario
.Width = 250
End With

cbMiBarra.ShowPopup
MsgBox "Lo introducido en el cuadro de texto es: " &
ceMiControlEdit.Text

CommandBars("MiBarra").Delete

Set ceMiControlEdit = Nothing
Set cbMiBarra = Nothing
End Sub


Un saludo.


Fernando Arroyo
MS MVP - Excel
#4 KL
28/03/2005 - 16:22 | Informe spam
Hola Sergio,

Mas info:
http://tinyurl.com/64t3d

Saludos,
KL

"SG Web Design - Sergio Gattelet" wrote in message
news:
Mostrar la cita
#5 KL
28/03/2005 - 16:33 | Informe spam
Perdon, no me di cuenta de haber copiado objetos graficos junto con el
texto.

KL

"KL" wrote in message
news:
Mostrar la cita
Ads by Google
Search Busqueda sugerida