View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Edward Ulle Edward Ulle is offline
external usenet poster
 
Posts: 92
Default Data from user form to certain cell

Maybe I should pay closer attention to my typing. Sorry.

Try this.

Option Explicit

Private Sub UserForm_Initialize()
ComboBox2.AddItem "One"
ComboBox2.AddItem "Two"
ComboBox2.AddItem "Three"
End Sub

Private Sub CommandButton1_Click()

Dim response As String

Worksheets("Sheet1").Cells(1, 6).Value = ComboBox2.Text
Worksheets("Sheet1").Cells(2, 6).Value = ComboBox2.Text

MsgBox "One record written to Sheet1"

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

If response = vbNo Then
Unload Me
End If

End Sub




*** Sent via Developersdex http://www.developersdex.com ***