CicoMico
08-27-2007, 03:32 AM
Hey! Have some problem here as usual :banghead: I have 2 workbooks. In wbk 1 I want to search for some value, then put it into var, switch to 2nd wbk and search column A from first to the last cell in row for this value. If it's not founded, then run some macro...
sample code:
workbook2.Activate
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For a = 1 To lastrow
If Cells(a, "A").Value <> XLZ Then
workbook1.Activate
Call SOME_MACRO
End If
Next a
My problem is, that it is not searching for some reason (at least it finds nothing). Any help or better solution? Thank you
sample code:
workbook2.Activate
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For a = 1 To lastrow
If Cells(a, "A").Value <> XLZ Then
workbook1.Activate
Call SOME_MACRO
End If
Next a
My problem is, that it is not searching for some reason (at least it finds nothing). Any help or better solution? Thank you