Hi all
I am looking for a code to:
-Get the name entered in cell C4 of the workbook currently open (Data Entry)
-Then open workbook named “Reports” and look through the table on "Sheet1" in column A for the cell matching the value of C4
-When found delete entire row
I post the code below jusy as a reference, this adds data on workbook2 based on a data entry in workbook1.
Thanks in advance for your help!!!
I am looking for a code to:
-Get the name entered in cell C4 of the workbook currently open (Data Entry)
-Then open workbook named “Reports” and look through the table on "Sheet1" in column A for the cell matching the value of C4
-When found delete entire row
I post the code below jusy as a reference, this adds data on workbook2 based on a data entry in workbook1.
Thanks in advance for your help!!!
VBA Code:
Dim wb1 As Workbook, wb2 As Workbook
Dim destSht As Worksheet, shSet As Worksheet
Dim Wind, Wind2 As Window
Set wb1 = ThisWorkbook
Set wb2 = Workbooks.Open("P:\Report\Structure\Reports.xlsm")
Set destSht = wb2.Worksheets("Sheet1")
Set Wind2 = Windows("Reports.xlsm")
Set Wind = Windows(ThisWorkbook.Name)
Wind.WindowState = xlMinimized
With ThisWorkbook.Worksheets("Data_Entry")
With .Range(.Range("H4:M4"), .Range("H4:M4").End(xlDown))
Wind2.WindowState = xlMinimized
destSht.Cells(destSht.Rows.Count, 1).End(xlUp).Offset(1).Resize(, 6).Value = .Value
End With
End With