Object Variable or With Block Variable Not Set
By reading other posts I have been trying to learn what I am doing
wrong but so far have been unable to do so. I am sure the question
has been asked and answered but either I can't find it or don't
recognize it when I see it.
I have a worksheet with three tabs BS, IS, and TB. BS and IS are
linked to TB with SumIf functions. I want to search the worksheets
and do a paste special values for the cells containing the SumIf but
leave the other formulas alone (the ones that contain column totals).
Using Worksheet BS I have a range BS and used the following code. The
code does what I want but at the end I get the message Object Variable
or With Block Variable Not Set. I would appreciate some help on what
I am doing wrong.
Sub Macro6()
For Each Cell In range("BS")
Cells.Find(What:="=sumif", After:=ActiveCell).Activate
Cells.FindNext(After:=ActiveCell).Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
ActiveSheet.Paste
Application.CutCopyMode = False
Next Cell
End Sub
Any help will be very much appreciated
Dennis
|