View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andrew B[_4_] Andrew B[_4_] is offline
external usenet poster
 
Posts: 42
Default TextBox Macro - Is there an easier way ?

Is there an easier way to do this macro ?
The textboxes are from the control toolbox.
I will have up to 25 textboxes included in this routine.
This macro sits in a normal module.

Sub LoadBox(T1)
Select Case T1
Case 1
ActiveSheet.EditBox.Text = ActiveSheet.TextBox1.Text
Case 2
ActiveSheet.EditBox.Text = ActiveSheet.TextBox2.Text
Case 3
ActiveSheet.EditBox.Text = ActiveSheet.TextBox3.Text
Case 4
ActiveSheet.EditBox.Text = ActiveSheet.TextBox4.Text
End Select
End Sub

Help much appreciated.

Andrew Bourke