MaikkiD
Posts1Registration dateThursday May 23, 2013StatusMemberLast seenMay 23, 2013
-
May 23, 2013 at 07:57 AM
Hi, I'm quite new to VBA and this has probably been asked before as well, so I'm sorry.
I am needing to filter out between two dates, but each day it will be different, so I want it as dynamic as possible.
I currently have
Dim firstRow As Integer
Dim lastRow As Integer
Dim sheetRange As String
Dim myDate As Date
firstRow = 2
myDate = Date
lastRow = Range("B" & Rows.Count).End(xlUp).Row
sheetRange = "A" & firstRow & ":U" & lastRow
I know I could Dim a new Date for myDate - 5 and use that, but later on in the script I may only want myDate - 4, or myDate - 11. So I don't want to Dim a new Date for every one I need
.
Is this possible?