Thread: Input box/form
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
acsell[_6_] acsell[_6_] is offline
external usenet poster
 
Posts: 1
Default Input box/form

Thankyou for your replies. I had already looked at the tutorial on this
site but that form puts each record on one row and I want the same 3
cell to be used eaxh time.

Thanks for telling me how to set the control source. I have now got it
to work but it doesn't enter any data in the first time but when you
click yes to enter another record it does enter the data.

Could you pleas have a look at the source and tell me why it might be
doing this.

Private Sub CommandButton1_Click()

TextBox1.ControlSource = "Sheet1!A1"
TextBox2.ControlSource = "Sheet1!A2"
TextBox3.ControlSource = "Sheet1!A3"

MsgBox "One record written to Sheet1"

response = MsgBox("Do you want to enter another record?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

TextBox1.SetFocus

Else
Unload Me
End If

End Sub

Private Sub CommandButton2_Click()
End
End Sub

Private Sub TextBox1_Change()

End Sub

Private Sub TextBox2_Change()

End Sub

Private Sub TextBox3_Change()

End Sub

Private Sub UserForm_Click()

End Sub




Thank you very much for all your help, Acsell



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/