How to: assign a value to a cell without selecting the cell first
Range("A1").Value = 1
It is also good practice to reference the workbook and worksheet
With Activeworkbook
With .Worksheets("Sheet1")
.Range("A1").Value = 5
....
End With
End With
note the leading dots
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
"George Furnell" wrote in message
...
Hi,
Its clear that I am still a newbie...
In VBA, how do I assign a value to a cell with out first selecting the
cell?
In pseudo code I would describe it as "Assign the value 5 to the cell in
location x".
Kind regards
George
|