Duplicar cuadro de texto

rguez

Board Regular
Joined
Jul 24, 2002
Messages
78
Hola

Estoy intentando crear dos cuadros de texto, uno en donde se escribe y otro (en una hoja distinta) donde AUTOMATICAMENTE (sin pinchar ningún botón ni nada por el estilo) aparece lo mismo que estás escribiendo en el cuadro anterior.

Hasta ahora he logrado hacerlo dentro de una misma hoja con el siguiente código:

Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
TextBox2.Text = TextBox1.Text
End Sub

Lo que ahora necesito es que los cuadros puedan estar en distintas hojas "sheets"

Gracias!!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Primero crea los 2 TextBox, uno en cada hoja. seguramente se llamaran igual pero no importa
Ya solo te faltara escribir esto:

Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Worksheets(2).TextBox1.Value = TextBox1.Value
End Sub


En resumen, que para referenciar a cosas que estan en una hoja distinta de la actual, se tiene que empezar por: Worksheets(x).
Donde "x" puede ser el numero de la hoja o el nombre de la hoja entre comillas.
 
Upvote 0

Forum statistics

Threads
1,217,367
Messages
6,136,146
Members
449,994
Latest member
Rocky Mountain High

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top