find file that starts with todays date

L

LuisE

and activate

this is what i have
For xxx = 1 To Workbooks.Count

If xxx.Name Like Format(Date, “yyyymmddâ€) & “.csv†Then
xxx.Activate
End If

Next xxx


thanks in advance
 
J

Jacob Skaria

Try the below

For Each wb In Workbooks
If wb.Name Like Format(Date, "yyyymmdd") & "*" Then _
wb.Activate: Exit For
Next

If this post helps click Yes
 
Top