how prin in cells by using vb macro

  • Thread starter Thread starter nader
  • Start date Start date
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
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top