View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Runtime Error 1004 - Method Range of '_Global failed'

on 9-7-2004, Sworkhard supposed :

With Worksheets("Customers & Jobs")
If Cells(7, ActiveCell.Column).Value = "Extra" Then


Cells on the last line is referring the the active sheet NOT (as you
probably intended)
to the cells of worksheet C&J because the . is missing before the
..Cells on the 2nd line

Worksheets("y").activate

With Worksheets("x")
'with a dot it will always refer to ws x
..Cells(1,1).value =3
'without the dot is will refer to activesheet in this case y
Cells(1,1).value = 3
end with

HTH,
keepITccol

--
This is an automatic signature of MesNews.
Site : http://mesnews.no-ip.com