ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to take user to a specific date (https://www.excelbanter.com/excel-programming/434853-macro-take-user-specific-date.html)

Raggy

Macro to take user to a specific date
 
I have a spreadsheet with dates running along the top row. I want to write a
macro to take me to todays date. Can this be done?

Jacob Skaria

Macro to take user to a specific date
 
MsgBox Rows(1).Find(What:=Date).Address
OR
MsgBox Rows(1).Find(What:=Date).Column


If this post helps click Yes
---------------
Jacob Skaria


"Raggy" wrote:

I have a spreadsheet with dates running along the top row. I want to write a
macro to take me to todays date. Can this be done?


Jacob Skaria

Macro to take user to a specific date
 
'To select or activate..
Activesheet.Rows(1).Find(Date, LookIn:=xlValues).Select

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

MsgBox Rows(1).Find(What:=Date).Address
OR
MsgBox Rows(1).Find(What:=Date).Column


If this post helps click Yes
---------------
Jacob Skaria


"Raggy" wrote:

I have a spreadsheet with dates running along the top row. I want to write a
macro to take me to todays date. Can this be done?


Raggy

Macro to take user to a specific date
 
How do I put this into my spreadsheet macro. I'm no expert, any further
advice very much appreciated

"Jacob Skaria" wrote:

MsgBox Rows(1).Find(What:=Date).Address
OR
MsgBox Rows(1).Find(What:=Date).Column


If this post helps click Yes
---------------
Jacob Skaria


"Raggy" wrote:

I have a spreadsheet with dates running along the top row. I want to write a
macro to take me to todays date. Can this be done?


Jacob Skaria

Macro to take user to a specific date
 
You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()

Sub Macro()
Activesheet.Rows(1).Find(Date, LookIn:=xlValues).Select
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Raggy" wrote:

How do I put this into my spreadsheet macro. I'm no expert, any further
advice very much appreciated

"Jacob Skaria" wrote:

MsgBox Rows(1).Find(What:=Date).Address
OR
MsgBox Rows(1).Find(What:=Date).Column


If this post helps click Yes
---------------
Jacob Skaria


"Raggy" wrote:

I have a spreadsheet with dates running along the top row. I want to write a
macro to take me to todays date. Can this be done?



All times are GMT +1. The time now is 07:27 AM.

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