View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Run Time Error "13": Type mismatch

Try:

y = ActiveCell.Value


"Matt" wrote in message
...
I keep getting a run time error when this macro gets to y=ActiveCell:

Any help would be appreciated.

40 ActiveCell.Offset(1, 4).Select
Do Until x 0
ActiveCell = 0
ActiveCell.Offset(-1, 0).Select
y = ActiveCell.Select
Do Until ActiveCell.EntireRow.Hidden = False
If ActiveCell.EntireRow.Hidden = True Then
ActiveCell.Offset(-1, 0).Select
End If
Loop
y = ActiveCell
If -x < y Then
ActiveCell = y + x
End If
x = x + y
Loop