YellowLabPro
05-26-2007, 09:24 AM
Because my workbook and worksheet names are different on every occassion, I wanted to go the route of
Set Wss = ActiveWorkbook.ActiveSheet
but me code breaks here:
If Wss.Range(i, 7) = "x" Then
Set Wss = ActiveWorkbook.ActiveSheet
Set Wst = Workbooks("Master PO.xls").Worksheets("FF")
LRow = Wss.Cells(Rows.Count, 1).End(xlUp).Row
For i = 12 To LRow
If Wss.Range(i, 7) = "x" Then
Wst.Cells(i, 3).Value = Wss.Cells(i, 7).Value
Wst.Cells(i, 4).Value = Wss.Cells(i, 2).Value
End If
Next i
Any ideas please?
thanks,
doug
Set Wss = ActiveWorkbook.ActiveSheet
but me code breaks here:
If Wss.Range(i, 7) = "x" Then
Set Wss = ActiveWorkbook.ActiveSheet
Set Wst = Workbooks("Master PO.xls").Worksheets("FF")
LRow = Wss.Cells(Rows.Count, 1).End(xlUp).Row
For i = 12 To LRow
If Wss.Range(i, 7) = "x" Then
Wst.Cells(i, 3).Value = Wss.Cells(i, 7).Value
Wst.Cells(i, 4).Value = Wss.Cells(i, 2).Value
End If
Next i
Any ideas please?
thanks,
doug