Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default find a date using several worksheets

I have a workbook that has several worksheets. On each worksheet I have
a column that that has a date of the month. I am trying to write a
macro code that will open the workbook using todays date. I have tried
several codes and each time it opens to the last worksheet in the
workbook. PLease help. I have been working on this for several days now
and cannot seem to get it right.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default find a date using several worksheets

Try this:

WorkBook_Open()

Dim objSheet as WorkSheet

For Each objSheet In ActiveWorkBook.WorkSheets
'assuming the date is in the same position on all sheets
If objSheet.Cells(1,1).Value = strSearch then
objSheet.Activate
End If
Next


bpotter wrote:

I have a workbook that has several worksheets. On each worksheet I have
a column that that has a date of the month. I am trying to write a
macro code that will open the workbook using todays date. I have tried
several codes and each time it opens to the last worksheet in the
workbook. PLease help. I have been working on this for several days now
and cannot seem to get it right.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default find a date using several worksheets

How do I get the date in it? What is objstring?

Thanks.

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
Find Specific date in Biwwekly Based on date jlclyde Excel Discussion (Misc queries) 3 January 27th 09 09:15 PM
Julian date - find next highest date/number jchick0909 Excel Worksheet Functions 1 March 20th 08 11:38 PM
Find the date of the coming up Saturday given the current date. Michael Ermino Excel Worksheet Functions 4 April 11th 07 02:48 AM
Using variables to make a date and using find method to find that. KyWilde Excel Programming 2 April 21st 05 09:43 PM
Find date and copy range based on that date avzundert Excel Programming 2 November 25th 04 10:31 AM


All times are GMT +1. The time now is 10:40 AM.

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

About Us

"It's about Microsoft Excel"