Ok,thats fine, thanks for explaining it,
whilst I have you can I just expand the question a little?
when the user inputs a 'date' to find if a worksheet with that 'date' is not
found can you also give me some code for this with a msg box like
"not found, either create one or enter another date!
thanks again
Anthony
"FSt1" wrote:
hi,
don't think so. to find a date the sheet name would have to be a
recognizable date and sheet naming convictions do not allow colons, slashes,
questions marks asterics or brackets. dates are usually written 7/13/05(with
slashes)
also in your example you had sheet name 14jul. this would not be recognized
as a date.
sorry
FSt1
"Anthony" wrote:
Hi, I am new to this, so this may well be a simple question.
I have this code which I want to seach all my worksheets in my workbook for
a worksheet which is called after today's date, ie if executed now it would
search for a worksheet named '14Jul'
here's the code I have
Sub Goto_Todays_log()
SheetName = "today()"
If sSheetName = "" Then Exit Sub
On Error Resume Next
Sheets(sSheetName).Select
On Error GoTo 0
End Sub
..but it doesn't work because it is seaching for a worksheet called "today()"
can anybody help - aLso if possible I wud like a msg box telling the user
that one hasn't been found with todays date if one not found
many thanks
|