Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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?

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
Run macro if user goes to a specific worksheet Danielle Excel Programming 2 September 23rd 09 05:49 PM
Last Save date/time and User for a specific sheet in a shared work Greg in CO[_2_] Excel Programming 8 September 17th 08 06:02 PM
Validate user input with specific date format YH Excel Programming 4 August 24th 06 02:38 PM
macro to input data on a specific date Ray Excel Programming 0 January 9th 06 02:48 AM
Date specific Macro DB100[_19_] Excel Programming 0 November 11th 04 03:28 PM


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

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"