setting a cells value using range

  • Thread starter Thread starter cantonarv
  • Start date Start date
C

cantonarv

what am i doing wrong

dim myRange as Range
dim iNum as integer
iNum= 6

Set myRange = Cells(iNum + 2, 1)
myRange.Value = 34

trying to set a cell myRange to cell(8,1)
then putting the value 34 into the cell
 
Works fine for me
You don't try to do this in a Function, do you?
It should work in a Sub
 
Back
Top