LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error '91' Object variable or With block variable not set Alec Coliver Excel Discussion (Misc queries) 2 October 24th 09 02:29 PM
object variable or with block variable not set Diego Excel Discussion (Misc queries) 1 August 9th 05 02:46 PM
Pivot Table - Object variable or with block variable not set? George Nicholson[_2_] Excel Programming 1 April 16th 04 09:12 PM
Error 91 - Object variable with block variable not set Jim[_35_] Excel Programming 2 November 27th 03 03:34 AM
Object Variable or With Block variable not set? Chris M.[_3_] Excel Programming 3 August 26th 03 04:30 PM


All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"