Quote:
Originally Posted by charlesdh
There is 1 thing about this code it will over write sheet1. If this is a problem you can use this line of code.
Code:
if Fpass = False And ActiveWorkbook.Sheets("Sheet1").Range("D8").Text = " " Then '' added the "and" statement
ActiveWorkbook.Sheets("Sheet1").Range("D8").Value = ws.Cells(Dcell.Row, 1).Text
ActiveWorkbook.Sheets("Sheet1").Range("D12").Value = ws.Cells(Dcell.Row, 2).Text
Fpass = True
End If
|
When does it overwrite Sheet1? I havent experienced that when running the code.