Hello,
Because of the success after my first post, I've decided to come back as I'm quite stuck again..
I'm trying to filter a range of dates for a ceirtan date that is given in cell L1 in the "ws" worksheet, but I can't seem to be able to filter for this value.
(for the record, my date-format is DDMMYYYY. The value in cell L1 has this format: DD.MM.YYYY)
Upon running the sub, a compiling error appears stating that "named argument not found".
Does anyone have any idea how to fix this issiue?
Thank you for your time.
Regards,
Kasper C
Because of the success after my first post, I've decided to come back as I'm quite stuck again..
I'm trying to filter a range of dates for a ceirtan date that is given in cell L1 in the "ws" worksheet, but I can't seem to be able to filter for this value.
(for the record, my date-format is DDMMYYYY. The value in cell L1 has this format: DD.MM.YYYY)
Upon running the sub, a compiling error appears stating that "named argument not found".
VBA Code:
Private Sub MySub()
Dim ws As Worksheet
Dim wb As Workbook
Dim adato As String
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Inn")
adato = Range("L1").Value
ws.Range("C1").AutoFilter Field:=3, Cirteria1:="=01062023" ' <- I want Criteria1 to be "adato", but just for displaying purposes I've changed it to the date/value I want to filter for, in this case "01.06.2023".
End Sub
Does anyone have any idea how to fix this issiue?
Thank you for your time.
Regards,
Kasper C