dear friends,
i have a macro and it's work fine if i run it from the VBA windows, but when i assign to a button, nothing happen, can someone help me with this issue?
for other macro work fine with the button.
here is my macro :
Sub doubelKoreksiFaktur()
Dim lastRow As Long
Dim x As Long
Dim i As Long
lastRow = Worksheets("Monitoring Faktur").Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To lastRow
If Cells(i, 1) <> "" Then
x = WorksheetFunction.Match(Cells(i, 1), Range("A1:A" & lastRow), 0)
If i <> x Then
Cells(i, 9) = "Duplicate"
End If
End If
Next
End Sub
regards,
bigMe
i have a macro and it's work fine if i run it from the VBA windows, but when i assign to a button, nothing happen, can someone help me with this issue?
for other macro work fine with the button.
here is my macro :
Sub doubelKoreksiFaktur()
Dim lastRow As Long
Dim x As Long
Dim i As Long
lastRow = Worksheets("Monitoring Faktur").Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To lastRow
If Cells(i, 1) <> "" Then
x = WorksheetFunction.Match(Cells(i, 1), Range("A1:A" & lastRow), 0)
If i <> x Then
Cells(i, 9) = "Duplicate"
End If
End If
Next
End Sub
regards,
bigMe