Try
Worksheets(Format(Date,"mmmm")).Activate
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"jimmy" <(E-Mail Removed)> wrote in message news:45eadcd4$1@127.0.0.1...
> ic..thank you.
> The 12 sheets have named as January to December, I wish to write the code
> in the Workbook open() function that the current month sheet activate...I
> tried MONTH(TODAY()).ACTIVATE but failed. What the code should be?
>
> "Bob Phillips" <(E-Mail Removed)>
> 级糶秎ン穝籇:(E-Mail Removed)...
>> This will vary the validation based upon the sheet name, so you can apply
>> the same formula to all sheets, not a different one to each.
>>
>> --
>> ---
>> HTH
>>
>> Bob
>>
>> (there's no email, no snail mail, but somewhere should be gmail in my
>> addy)
>>
>>
>>
>> "jimmy" <(E-Mail Removed)> wrote in message
>> news:45eac360$1@127.0.0.1...
>>> Thank you..
>>> In fact, what's the different between using this and just set 01-03-2007
>>> to 31-03-2007 in the Data => Validation?
>>>
>>> "Tom Ogilvy" <(E-Mail Removed)>
>>> 级糶秎ン穝籇:(E-Mail Removed)...
>>>> First, the sheet must have a Month name, so change Sheet3 to Mar
>>>> Put this in cell E1 of the sheet named Mar (don't change the formula -
>>>> don't replace "filename")
>>>>
>>>> =MONTH(DATEVALUE("01-"&MID(CELL("Filename",A1),FIND("]",CELL("filename",A1))+1,99)&"-"&YEAR(TODAY())))
>>>>
>>>> Now select Column A of the sheet named Mar
>>>>
>>>> go to Data=>Validation
>>>>
>>>> Select Custom and in the textbox put in the formula
>>>>
>>>> =Month(A1)=$E$1
>>>>
>>>> and click OK.
>>>>
>>>> --
>>>> Regards,
>>>> Tom Ogilvy
>>>>
>>>> "jimmy" <(E-Mail Removed)> wrote in message
>>>> news:45e9e320$1@127.0.0.1...
>>>>> My excel file is in the d:Book1.xls, I type the following in the
>>>>> sheet3 cell "E1", then E1 display 1900/1/0. How to use it to check
>>>>> for the cell in "A1" is my specific valid month?
>>>>>
>>>>> =MONTH(E1)=MONTH(DATEVALUE("01-"&MID(CELL("d:Book1.xls.Sheet3",A1),FIND("]",CELL("d:Book1.xls.Sheet3",A1))+1,99)&"-"&YEAR(TODAY())))
>>>>>
>>>>>
>>>>>
>>>>> "Tom Ogilvy" <(E-Mail Removed)>
>>>>> 级糶秎ン穝籇:(E-Mail Removed)...
>>>>>> Filename is an argument to the Cell worksheet function telling it to
>>>>>> return the fully qualified path and filename of the workbook (and the
>>>>>> sheet name). However, it returns nothing unless the workbook has been
>>>>>> saved once (so it has a fully qualified path and filename).
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Tom Ogilvy
>>>>>>
>>>>>>
>>>>>> "jimmy" <(E-Mail Removed)> wrote in message
>>>>>> news:45e98feb$1@127.0.0.1...
>>>>>>> Sorry, what is "filename" for?
>>>>>>> I tried to copy & paste your formula to E1 but doesn't, how to test?
>>>>>>> Thanks..
>>>>>>> "Bob Phillips" <(E-Mail Removed)>
>>>>>>> 级糶秎ン穝籇:%23$(E-Mail Removed)...
>>>>>>>> You could create data validation for the column, let's say column E
>>>>>>>> for this example, with a custom type and a formula of
>>>>>>>>
>>>>>>>> =MONTH(E1)=MONTH(DATEVALUE("01-"&MID(CELL("Filename",A1),FIND("]",CELL("filename",A1))+1,99)&"-"&YEAR(TODAY())))
>>>>>>>>
>>>>>>>> --
>>>>>>>> ---
>>>>>>>> HTH
>>>>>>>>
>>>>>>>> Bob
>>>>>>>>
>>>>>>>> (there's no email, no snail mail, but somewhere should be gmail in
>>>>>>>> my addy)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "jimmy" <(E-Mail Removed)> wrote in message
>>>>>>>> news:45e951b3$1@127.0.0.1...
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> How to set the entry in a specific column must in date type and
>>>>>>>>> checking for this date must in a specific month? e.g. in the sheet
>>>>>>>>> name "Feb", all the date in column in "A" other than February will
>>>>>>>>> not be accepted and prompt a dialog box to ask the user to use
>>>>>>>>> another sheet..
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
|