VBScript Error Run-Time 1004

jhedges

Board Regular
Joined
May 27, 2009
Messages
208
Anyone,

I have been working on the following worksheet, which has A3-Z27 cells right now and will grow/shrink with time. The spreadsheet shown below is just a portion of the entire worksheet. My vbscript is below the worksheet. I have two worksheets PL Dbase and Waiting List. I am copying columns B thru G from Waiting List if Column J is = to "Yes". To the next available row in worksheet PL Dbase columns B thru G...These columns have the same headings on both worksheets. I am getting the following error, when I click the button I assigned the macro to: Run-Time Error 1004 Copy Method of Range Class Failed. Can someone help me figure out what I have wrong?

Waiting List

<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 10pt; FONT-FAMILY: MS Sans Serif,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 124px"><COL style="WIDTH: 106px"><COL style="WIDTH: 106px"><COL style="WIDTH: 82px"><COL style="WIDTH: 59px"><COL style="WIDTH: 58px"><COL style="WIDTH: 61px"></COLGROUP><TBODY><TR style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><TD></TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD></TR><TR style="HEIGHT: 38px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; TEXT-ALIGN: center">Status</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; TEXT-ALIGN: center">LastName</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; TEXT-ALIGN: center">FirstName</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; TEXT-ALIGN: center">Personnel #</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; TEXT-ALIGN: center">T #</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0; TEXT-ALIGN: center">Email</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; TEXT-ALIGN: center">Gender</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Clifton</TD><TD style="FONT-FAMILY: Arial">Sarah</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01592233</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">AU6267</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">AU6267,</TD><TD style="FONT-FAMILY: Arial">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Cooke</TD><TD style="FONT-FAMILY: Arial">Richard</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01085094</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">Tc2023</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">Tc2023,</TD><TD style="FONT-FAMILY: Arial">Male</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">6</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Drake</TD><TD style="FONT-FAMILY: Arial">Phil</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01130303</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">tz8248</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">tz8248,</TD><TD style="FONT-FAMILY: Arial">Male</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">7</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Dunajski</TD><TD style="FONT-FAMILY: Arial">Kayle</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01554779</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">AJ6833</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">AJ6833,</TD><TD style="FONT-FAMILY: Arial">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">8</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Fraticelli</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Marlene</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01559810</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">Ak7775</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Ak7775,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Female</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">9</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Fraticelli</TD><TD style="FONT-FAMILY: Arial">Marlene</TD><TD style="FONT-FAMILY: Arial"></TD><TD style="FONT-FAMILY: Arial"></TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0"></TD><TD style="FONT-FAMILY: Arial">Female</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">10</TD><TD style="BACKGROUND-COLOR: #c0c0c0">REMOVED</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #c0c0c0">Hamilton</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #c0c0c0">Golden</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #c0c0c0; TEXT-ALIGN: left">01660175</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #c0c0c0"></TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #c0c0c0"></TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #c0c0c0">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">11</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Hogben</TD><TD style="FONT-FAMILY: Arial">Peter</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01629981</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">AN6355</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">AN6355,</TD><TD style="FONT-FAMILY: Arial">Male</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">12</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Johnson</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Sherry</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01621769</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">Bf7270</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Bf7270,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Female</TD></TR><TR style="HEIGHT: 19px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">13</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Kohus</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Viviana</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01564661</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">Am6661</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Am6661,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">14</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Linder</TD><TD style="FONT-FAMILY: Arial">Nadyne</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01134538</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">tz4597</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">tz4597,</TD><TD style="FONT-FAMILY: Arial">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">15</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Lubanski</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Donata</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01627450</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">BF5350</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">BF5350,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">16</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Lucas</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Bob</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01146427</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">TQ1415</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">TQ1415,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Male</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">17</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Madison</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Brooke</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01649141</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">BO3232</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">BO3232,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">18</TD><TD style="FONT-WEIGHT: bold; COLOR: #ffffff; BACKGROUND-COLOR: #008000">OK</TD><TD style="FONT-FAMILY: Arial">Moeller</TD><TD style="FONT-FAMILY: Arial">Pam</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">01036543</TD><TD style="FONT-FAMILY: Arial; TEXT-ALIGN: left">TM3577</TD><TD style="FONT-FAMILY: Arial; BACKGROUND-COLOR: #a6caf0">TM3577,</TD><TD style="FONT-FAMILY: Arial">Female</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">19</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Morgan</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Brad</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01646837</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">Bn8217</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Bn8217,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Male</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">20</TD><TD style="FONT-WEIGHT: bold; BACKGROUND-COLOR: #ffff00">Warning</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Pepin</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Judi</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">01017742</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00; TEXT-ALIGN: left">TV5338</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">TV5338,</TD><TD style="FONT-WEIGHT: bold; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffff00">Female</TD></TR></TBODY></TABLE>
<TABLE style="FONT-SIZE: 10pt; BORDER-LEFT-COLOR: #00ff00; BORDER-BOTTOM-COLOR: #00ff00; COLOR: #000000; BORDER-TOP-STYLE: groove; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-RIGHT-STYLE: groove; BORDER-LEFT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-RIGHT-COLOR: #00ff00; BORDER-BOTTOM-STYLE: groove"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-SIZE: 9pt; FONT-FAMILY: Arial" cellSpacing=0 cellPadding=2 border=1><TBODY><TR style="FONT-SIZE: 10pt; BACKGROUND-COLOR: #cacaca"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>A4</TD><TD>=(IF((OR(Q4<8,S4="Yes")),"Warning",IF(X4="Yes","REMOVED","OK")))</TD></TR><TR><TD>F4</TD><TD>=IF(AND(E4=""),"",(E4&","))</TD></TR><TR><TD>A5</TD><TD>=(IF((OR(Q5<8,S5="Yes")),"Warning",IF(X5="Yes","REMOVED","OK")))</TD></TR><TR><TD>F5</TD><TD>=IF(AND(E5=""),"",(E5&","))</TD></TR><TR><TD>A6</TD><TD>=(IF((OR(Q6<8,S6="Yes")),"Warning",IF(X6="Yes","REMOVED","OK")))</TD></TR><TR><TD>F6</TD><TD>=IF(AND(E6=""),"",(E6&","))</TD></TR><TR><TD>A7</TD><TD>=(IF((OR(Q7<8,S7="Yes")),"Warning",IF(X7="Yes","REMOVED","OK")))</TD></TR><TR><TD>F7</TD><TD>=IF(AND(E7=""),"",(E7&","))</TD></TR><TR><TD>A8</TD><TD>=(IF((OR(Q8<8,S8="Yes")),"Warning",IF(X8="Yes","REMOVED","OK")))</TD></TR><TR><TD>F8</TD><TD>=IF(AND(E8=""),"",(E8&","))</TD></TR><TR><TD>A9</TD><TD>=(IF((OR(Q9<8,S9="Yes")),"Warning",IF(X9="Yes","REMOVED","OK")))</TD></TR><TR><TD>F9</TD><TD>=IF(AND(E9=""),"",(E9&","))</TD></TR><TR><TD>A10</TD><TD>=(IF((OR(Q10<8,S10="Yes")),"Warning",IF(X10="Yes","REMOVED","OK")))</TD></TR><TR><TD>F10</TD><TD>=IF(AND(E10=""),"",(E10&","))</TD></TR><TR><TD>A11</TD><TD>=(IF((OR(Q11<8,S11="Yes")),"Warning",IF(X11="Yes","REMOVED","OK")))</TD></TR><TR><TD>F11</TD><TD>=IF(AND(E11=""),"",(E11&","))</TD></TR><TR><TD>A12</TD><TD>=(IF((OR(Q12<8,S12="Yes")),"Warning",IF(X12="Yes","REMOVED","OK")))</TD></TR><TR><TD>F12</TD><TD>=IF(AND(E12=""),"",(E12&","))</TD></TR><TR><TD>A13</TD><TD>=(IF((OR(Q13<8,S13="Yes")),"Warning",IF(X13="Yes","REMOVED","OK")))</TD></TR><TR><TD>F13</TD><TD>=IF(AND(E13=""),"",(E13&","))</TD></TR><TR><TD>A14</TD><TD>=(IF((OR(Q14<8,S14="Yes")),"Warning",IF(X14="Yes","REMOVED","OK")))</TD></TR><TR><TD>F14</TD><TD>=IF(AND(E14=""),"",(E14&","))</TD></TR><TR><TD>A15</TD><TD>=(IF((OR(Q15<8,S15="Yes")),"Warning",IF(X15="Yes","REMOVED","OK")))</TD></TR><TR><TD>F15</TD><TD>=IF(AND(E15=""),"",(E15&","))</TD></TR><TR><TD>A16</TD><TD>=(IF((OR(Q16<8,S16="Yes")),"Warning",IF(X16="Yes","REMOVED","OK")))</TD></TR><TR><TD>F16</TD><TD>=IF(AND(E16=""),"",(E16&","))</TD></TR><TR><TD>A17</TD><TD>=(IF((OR(Q17<8,S17="Yes")),"Warning",IF(X17="Yes","REMOVED","OK")))</TD></TR><TR><TD>F17</TD><TD>=IF(AND(E17=""),"",(E17&","))</TD></TR><TR><TD>A18</TD><TD>=(IF((OR(Q18<8,S18="Yes")),"Warning",IF(X18="Yes","REMOVED","OK")))</TD></TR><TR><TD>F18</TD><TD>=IF(AND(E18=""),"",(E18&","))</TD></TR><TR><TD>A19</TD><TD>=(IF((OR(Q19<8,S19="Yes")),"Warning",IF(X19="Yes","REMOVED","OK")))</TD></TR><TR><TD>F19</TD><TD>=IF(AND(E19=""),"",(E19&","))</TD></TR><TR><TD>A20</TD><TD>=(IF((OR(Q20<8,S20="Yes")),"Warning",IF(X20="Yes","REMOVED","OK")))</TD></TR><TR><TD>F20</TD><TD>=IF(AND(E20=""),"",(E20&","))</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4

Code:
Option Explicit
Sub CopyBGColIYes()
Dim NR As Long, c As Range, firstaddress As String
Application.ScreenUpdating = False
NR = Sheets("PL dbase").Cells(Rows.Count, 7).End(xlUp).Row + 1
With Sheets("Waiting List").Columns(9)
  Set c = .Find("Yes", LookIn:=xlValues, lookat:=xlWhole)
  If Not c Is Nothing Then
    firstaddress = c.Address
    Do
      Sheets("Waiting List").Range("B" & c.Row & ":G" & c.Row).Copy Sheets("PL dbase").Range("B" & NR)
      NR = NR + 1
      Set c = .FindNext(c)
    Loop While Not c Is Nothing And c.Address <> firstaddress
  End If
End With
Sheets("PL dbase").Select
Application.ScreenUpdating = True
End Sub
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I would reaaly appreciate any help I could get on this error...Please.

The error occurs in the line of code indicated here:

Code:
Sheets("Waiting List").Range("B" & c.Row & ":G" & c.Row).Copy Sheets("PL dbase").Range("B" & NR)
 
Upvote 0
What's the value of NR and c.Row when the code bugs out? Hoever your mouse cursor over the variable names in the code window and you should get a popup with the values.
 
Upvote 0
Richard,

No - none of the worksheets or the workbook are protected; however, the VBA project page is password protected - if that matters?
 
Upvote 0
Well, I don't think that should affect the copy/paste. I'm not sure why you'd be having problems. I''ll ask somebody else.
 
Upvote 0
Thank you so much for your help and effort. One thing I wanted to mention is the code worked once, maybe twice; however, now I get the error.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top