Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default GOTO Using the ()NOW Function Q

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default GOTO Using the ()NOW Function Q

You can't use Goto. Look at Find in Help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"John" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default GOTO Using the ()NOW Function Q

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



John wrote:

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


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default GOTO Using the ()NOW Function Q

Dave thanks for your post

I've copied your code into a module but nothing is happening. Not sure if I
have it within the correct area as the 'Option Explicit' text appears above
another Sub I have, I can't get it within the same sub


"Dave Peterson" wrote in message
...
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



John wrote:

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


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
goto function in macro 2 mohavv Excel Discussion (Misc queries) 5 January 21st 08 08:33 PM
goto function in macro mohavv Excel Discussion (Misc queries) 1 January 21st 08 01:20 AM
A goto function for Mobile Excel salbre57 Excel Worksheet Functions 0 July 18th 06 01:56 PM
Goto statement in an IF function =\ Excel Worksheet Functions 2 August 11th 05 06:21 PM
On Error Goto doesn't goto Paul Excel Programming 0 October 15th 04 03:05 PM


All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"