Greetings,
I am trying to get this code to work. It works when i'm searching for text but I can't seem to get it to search for approval dates (dd-mm-yyyy) that are in a spreadsheet i created.
Private Sub approvalsearch_Click()
Dim strName As String
Dim caption As String
Dim Prompt As String
Prompt = "What Approval Date Would You Like to Search For?"
caption = "Approval Date Search"
strName = Val(InputBox(Prompt, caption))
Range("Table_owssvr_1[Approval Date]").Select
Selection.AutoFilter Field:=6, Criteria1:="=*" & strName & ", Operator:=xlAnd"
End Sub
Any ideas on how to fix it?
I am trying to get this code to work. It works when i'm searching for text but I can't seem to get it to search for approval dates (dd-mm-yyyy) that are in a spreadsheet i created.
Private Sub approvalsearch_Click()
Dim strName As String
Dim caption As String
Dim Prompt As String
Prompt = "What Approval Date Would You Like to Search For?"
caption = "Approval Date Search"
strName = Val(InputBox(Prompt, caption))
Range("Table_owssvr_1[Approval Date]").Select
Selection.AutoFilter Field:=6, Criteria1:="=*" & strName & ", Operator:=xlAnd"
End Sub
Any ideas on how to fix it?