Hi, i'm getting all stuck and cant find my way out HELP!
I am reading in files 1-31 using a counter and loop, which are days of the month. Before doing the business I need to exclude weekends and I'm trying to build a date and dump the ones over the weekend. you'll see below my poor attempt.
But i cant seem to figure this out. I'm sure its a simple one, but I'm a VBA dullard!!
Any help would be tops.
Thanks
Ben
I am reading in files 1-31 using a counter and loop, which are days of the month. Before doing the business I need to exclude weekends and I'm trying to build a date and dump the ones over the weekend. you'll see below my poor attempt.
But i cant seem to figure this out. I'm sure its a simple one, but I'm a VBA dullard!!
Any help would be tops.
Thanks
Ben
Code:
For counter2 = 1 To 31
mm = Val(Mid(DateRun, 1, 2))
yyyy = Val(Mid(DateRun, 5, 4))
dd = counter2
dateChk = mm & dd & yyyy
DayChk = Weekday(dateChk, vbMonday)
If DayChk < 6 Then