find file that starts with todays date

  • Thread starter Thread starter LuisE
  • Start date Start 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
 
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
 
Back
Top