Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default Urgent - running time error type mismatch

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Urgent - running time error type mismatch

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


"keith" wrote:

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

Reply
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
run-time error 13: Type mismatch? Marko Enula Excel Discussion (Misc queries) 2 February 5th 08 01:00 PM
Run-Time error, type Mismatch T De Villiers[_79_] Excel Programming 1 July 31st 06 03:28 PM
Run-time error 13, Type Mismatch T De Villiers[_73_] Excel Programming 2 July 31st 06 03:01 PM
Run Time Error 13 Type Mismatch ExcelMonkey Excel Programming 3 October 12th 05 12:51 PM
Type Mismatch Error when running a SELECT SQL Andy Dorph Excel Programming 1 February 9th 05 06:12 PM


All times are GMT +1. The time now is 04:48 AM.

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

About Us

"It's about Microsoft Excel"