View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mohanasundaram[_2_] Mohanasundaram[_2_] is offline
external usenet poster
 
Posts: 2
Default Method 'Range' of object '_Global' failed

Hi All,

I have the following code in my Excel Macro.
While running this macro I am getting the following error
"Method 'Range' of object '_Global' failed"
What is wrong with this code

Dim i As Long
Dim s As String
i = 1

While (1)
s = "G" + CStr(i)
If Range(s).Value = "Completed" Then
Range(s).EntireRow.Hidden = True
End If

i = i + 1
Wend

Regards,
Moahn.