View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Run Time Error "13": Type mismatch

The ActiveCell is already selected (plus you can't perform a selection as
part of an assignment... selection on one line, assignment on a different
line)... just assign the Value property to y...

y = ActiveCell.Value

--
Rick (MVP - Excel)


"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