View Single Post
 
Old 04-13-2015, 10:05 AM
ksigcajun ksigcajun is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

Quote:
Originally Posted by charlesdh View Post
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.
Reply With Quote