Error message

G

gav meredith

Hi,

I have encountered a problem with the following code and am receiving this
message - object variable or with block variable not set. Can someone
advise??

Private Sub CommandButton1_Click()

Sheets("quote2").Range("appendix").Copy

Sheets("contract").Select
Cells.FindNext(After:=ActiveCell).Activate

Cells.Find(What:="appendix", _
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False).Activate

ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
End Sub
 
G

gav meredith

.....and once again the problem presents itself. I apologise for the
confusion. It appears when there is a large qty of data to copy, the error
occurs.

Any ideas???

Thanks all!!!!
 
G

gav meredith

this is the line of code it refers to...

Cells.FindNext(After:=ActiveCell).Activate

thank you
 
G

gav meredith

hi seamus

i am still having troubles unfortunately. Would it be possible for me to send you my workbook for you, or anyone willing, to look at??

Thanks!

----- SOS > wrote: ----

Hi gav

On trying to emulate your problem I could only do so if the tex
"appendix" was not in sheet ("contract")

After adding "appendix" to a cell in sheet ("contract") the code ra
fine no matter the size of the range "appendix"

Regard

Seamu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top