View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Help with Run-time error '1004': Method 'Range' of object'_Workshe

You don't need the Range() function. Cells() already give you the range:

Sub dural()
Dim goalWS As Worksheet
Dim c1 As Integer, cRow As Integer, cCol As Integer
cRow = 1
cCol = 1
c1 = 1
Set goalWS = Worksheets("AAV Goals Update Tables")
goalWS.Cells(cRow, cCol) = c1
End Sub

will work just fine.
--
Gary''s Student - gsnu200902


"Ayo" wrote:

I know that I did something wrong but I don't know what it is. The error
occurs on the second line of code. Any help will be appreciated.
Thanks.

Set goalWS = Worksheets("AAV Goals Update Tables")
goalWS.Range(Cells(cRow, cCol)) = c1