how prin in cells by using vb macro

N

nader

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 fro
the textbox or command
by the way I did this code : cells.cells and it print in all cells o
excel, I want to print in a specific cells like a1 and b2 etc..

and thankyou for all
 
M

Mauro Gamberini

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
 
B

Bob Phillips

Try Cells(1,"A") as an example - A1.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top