ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   GoTo macro... (https://www.excelbanter.com/excel-discussion-misc-queries/221540-goto-macro.html)

TomCat

GoTo macro...
 
I have a very simple macro that I created in a sheet for the week of 13 Feb
09.

Sub GoToK019()
'
' GoToK019 Macro
' Go to K019
'
Range("A472").Select
End Sub

All I want to do is go to cell A472. However, when I save the sheet to the
week of 20 Feb 09 and fire the macro, it opens up the sheet for 13 Feb 09 and
goes to that cell. I have around 70+ of these in that sheet.

How do I get the macros to carry forward each week and apply to the sheet
for the current week?

Thanks..........TC

TomCat

GoTo macro...
 
I might add....there are other people who use this sheet. Placing the macros
into my personal won't work!

"TomCat" wrote:

I have a very simple macro that I created in a sheet for the week of 13 Feb
09.

Sub GoToK019()
'
' GoToK019 Macro
' Go to K019
'
Range("A472").Select
End Sub

All I want to do is go to cell A472. However, when I save the sheet to the
week of 20 Feb 09 and fire the macro, it opens up the sheet for 13 Feb 09 and
goes to that cell. I have around 70+ of these in that sheet.

How do I get the macros to carry forward each week and apply to the sheet
for the current week?

Thanks..........TC


Bob Phillips[_3_]

GoTo macro...
 
Sub GoToK019()
'
' GoToK019 Macro
' Go to K019
'
Dim shName As String

shName = Format(Date + 7 - (Weekday(Date + 1)), "dd mmm yy")
Application.Goto Worksheets(shName).Range("A472").Select
End Sub


--
__________________________________
HTH

Bob

"TomCat" wrote in message
...
I have a very simple macro that I created in a sheet for the week of 13 Feb
09.

Sub GoToK019()
'
' GoToK019 Macro
' Go to K019
'
Range("A472").Select
End Sub

All I want to do is go to cell A472. However, when I save the sheet to
the
week of 20 Feb 09 and fire the macro, it opens up the sheet for 13 Feb 09
and
goes to that cell. I have around 70+ of these in that sheet.

How do I get the macros to carry forward each week and apply to the sheet
for the current week?

Thanks..........TC





All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com