View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mauro Gamberini[_2_] Mauro Gamberini[_2_] is offline
external usenet poster
 
Posts: 2
Default how prin in cells by using vb macro

I want to use the visual basic tools coomand and textbox
so I want to know how Ii can print the data in the cells of excel from
the textbox or command

Private Sub CommandButton1_Click()
Sheet1.Range("A1").Value = TextBox1.Text
End Sub

Or

Private Sub CommandButton1_Click()
ActiveCell.Value = TextBox1.Text
End Sub

--
----------------------------
Mauro Gamberini