View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default using textbox for cell values

Hi Gus,

When you use Cells the row/column reference is back to front to Range method
and if you use the alpha column reference then enclose it in double quotes:-

Sheet1.Cells(1, "A") = TextBox1.Value

Using numeric column reference:-
Sheet1.Cells(1, 1) = TextBox1.Value
--
Regards,

OssieMac


"Gus Chuch" wrote:

This is my first attempt at VB for excel. All Im trying to do is write to a
cell using a form with a textbox and a command button.
I would think you would do it something like this but its not working.
Private Sub CommandButton1_Click()
Sheet1.Cells(A, 1) = TextBox1.Value
End Sub

Any help would be appreciated
Gus Chuchanis