Thread: 1004 error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lp12 Lp12 is offline
external usenet poster
 
Posts: 54
Default 1004 error

Hi All i get the 1004 error msg when the code enters: Worksheets("Paydata
Import File Sample").Range("D1").Select
Im using excel2003.
I've tried to see other threads but in vain.
Any thoughts?


Private Sub Worksheet_Activate()
Dim i As Integer
Application.ScreenUpdating = False
Worksheets("Paydata Import File Sample").Range("D1").Select
Do
If ActiveCell.Value = ActiveCell.Offset(-1, 0).Value Then
i = i + 1
End If
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell.Value = ""
Sheets("Statistics").Select
Range("C1").Value = i
Application.ScreenUpdating = True
End Sub