View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Easy one- Comman button close

Hi David

Worksheets("Sheet1").Range("C4").Value = TextBox1.Text
Unload Me


--
Regards Ron de Bruin
http://www.rondebruin.nl


"David" wrote in message ...
What is the code to get a command button to populate a
field and then close the form when the user clicks the
button once?

So far the code I have is:

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Range("C4").Value = TextBox1.Text

End Sub

What am I missing please?

Thanks,
David