Page 1 of 1

VBA

Posted: Sun Jun 18, 2023 1:10 pm
by sna
Hi there!

I have got a problem.i have a date range in column B .my purpose is to select today date when workbook open.

Tks

Code: Select all

Private Sub Workbook_Open()
   Dim Fnd As Range
   Set Fnd = Sheets("Sheet1").Range("B:B").Find(Format(Date, "dd/mm/yyyy"), , xlValues, , , , , , False)
   If Not Fnd Is Nothing Then 
   Application.Goto Fnd,True
   End if
End Sub

Re: VBA

Posted: Mon Jun 19, 2023 5:22 pm
by sna
Hi my code not working fine.any one hands in?
thanks

Re: VBA

Posted: Tue Jun 20, 2023 10:26 pm
by snasui
:D Please try this statement.

Set Fnd = Sheets("Sheet1").Range("B:B").Find(Date, , xlValues, , , , , , False)

Re: VBA

Posted: Wed Jun 21, 2023 12:02 pm
by sna
thanks 😊