Urgent - running time error type mismatch

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been working on this for 2 days now, I am not fab at this stuff, but
can get through. however this keeps crashing. I wrote the enclosed code via
the record function. however it keeps crashing. the first time is at line 28
on the sheet. I have deleted this line and run macro again and it works, I fe
formatted the line the same as all the others that work, but it still
crashes. Help

Worksheets("Dont Send").Select
Do Until (Cells(A + 1, 3) = Empty)
If Worksheets("Dont Send").Cells(8, 4).Value <> "" Then

Rows("4:4").Select
Selection.Copy
Sheets("Itemstoquote").Select
Range("A2").Select
ActiveSheet.Paste
Range("A3").Select
' A 1 + 1

Sheets("Dont Send").Select
Rows("4:4").Select
Selection.Delete

Else
Sheets("Dont Send").Select
Rows("4:4").Select
Selection.Delete


End If
Loop

nb the code is note quite finished as it should be pasting to A + 1 each time
 
I'm notg sure exactly what you want to do, but I made some changes to make it
easier for you to get the code working. Modify as necessary. This is just a
templet for you to work from.

Worksheets("Dont Send").Select
RowCount = 1
with Worksheets("Dont Send")
Do while .Cells(PowCount, "C") <> ""
If .Cells(8, "D").Value <> "" Then

.Rows("4:4").copy _
destination:= Sheets("Itemstoquote").Range("A" & RowCount)

.Rows("4:4").copy _
destination:= Sheets("Itemstoquote").Range("A" &( RowCount + 1))

.Rows("4:4").Delete

Else
.Rows("4:4").Delete
End If

RowCount = RowCount + 1
Loop
 

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

Back
Top