![]() |
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. |
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. |
find a date using several worksheets
How do I get the date in it? What is objstring?
Thanks. |
All times are GMT +1. The time now is 04:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com