chungtinhlak
03-12-2009, 09:22 AM
I get an error "constant Expression Required" at
Dim keywords(1 To UserForm1.numofkeywords) As Long, match As Long
Can somebody help me?
thanks
Private Sub CommandButton1_Click()
usedcell = Application.WorksheetFunction.CountA(Range("A:A"))
Dim keywords(1 To UserForm1.numofkeywords) As Long, match As Long
For w = 1 To numofkeywords
keywords(w) = InputBox("Please input keyword " & w)
Next
Range(des & 1).Value = "Contains Your keyword"
For i = 2 To usedcell
For x = 1 To numofkeywords
If Range(search & i).Value Like "*" & keywords(x) Then
match = match + 1
Next x
Range(des & i).Value = match
match = 0
Next i
End Sub
Dim keywords(1 To UserForm1.numofkeywords) As Long, match As Long
Can somebody help me?
thanks
Private Sub CommandButton1_Click()
usedcell = Application.WorksheetFunction.CountA(Range("A:A"))
Dim keywords(1 To UserForm1.numofkeywords) As Long, match As Long
For w = 1 To numofkeywords
keywords(w) = InputBox("Please input keyword " & w)
Next
Range(des & 1).Value = "Contains Your keyword"
For i = 2 To usedcell
For x = 1 To numofkeywords
If Range(search & i).Value Like "*" & keywords(x) Then
match = match + 1
Next x
Range(des & i).Value = match
match = 0
Next i
End Sub