View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jamie[_12_] Jamie[_12_] is offline
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.