GOTO Using the ()NOW Function Q

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am trying to go to the cell, 2 columns to the right of the cell the
current day is displayed in.

I have a list of days of the year in column A, input starts on Column C. I
want to initiate the user to go to the 'Current day' via the ()NOW function.
Part of the code I wish to use, which will freeze panes etc is below, but
not sure the syntax for including the ()NOW function

Thanks

Application.Goto Range("Schedule!A1"), True
ActiveCell.Offset(2, 0).Select
ActiveWindow.FreezePanes = True
 
You can't use Goto. Look at Find in Help.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I assumed that the dates were in a single column (A) on a worksheet named
Sheet1:

Option Explicit
Sub testme()

Dim res As Variant
Dim myRng As Range

With Worksheets("sheet1")
Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
res = Application.Match(CLng(Date), myRng, 0)

If IsError(res) Then
'not found, what should happen?
Else
Application.Goto myRng(res), scroll:=True
myRng(res).Offset(0, 2).Select
ActiveWindow.FreezePanes = True
End If
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top