Hi,
I have an AutoIt script that does a lookup in an .xls file and when a match is found it copies data from an offset cell.
This part works fine, but I cant seem to control when a match is not found.
The ;~ part is what I am hoping someone can help with.
Func Lookup()
$oExcel = ObjCreate("Excel.Application")
$oExcel.Visible = 0
$oExcel.WorkBooks.Open ("\\document\location\name.xls")
With $oExcel.ActiveSheet.Range("A:A").Find ($Name)
$Match = .Find ($Name)
;~ If $Match = False Then
;~ do something Then
;~ Exit
;~ Else
;~ do some other thing
;~ EndIf
$Match.Offset (0, 1).copy
EndWith
$oExcel.Quit
EndFunc
I have an AutoIt script that does a lookup in an .xls file and when a match is found it copies data from an offset cell.
This part works fine, but I cant seem to control when a match is not found.
The ;~ part is what I am hoping someone can help with.
Func Lookup()
$oExcel = ObjCreate("Excel.Application")
$oExcel.Visible = 0
$oExcel.WorkBooks.Open ("\\document\location\name.xls")
With $oExcel.ActiveSheet.Range("A:A").Find ($Name)
$Match = .Find ($Name)
;~ If $Match = False Then
;~ do something Then
;~ Exit
;~ Else
;~ do some other thing
;~ EndIf
$Match.Offset (0, 1).copy
EndWith
$oExcel.Quit
EndFunc