View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Check date and act on it

Dim sh as Worksheet
if year(cell) = 2006 then
set sh = Worksheets(format(cell,"mmm"))
else
set sh = worksheets("Parking")
End if

There is not "TEXT" function in VBA.

However, based on the OP's original response, I don't know if this is
helpful. Perhaps

http://www.rondebruin.nl/copy5.htm

--
Regards,
Tom Ogilvy


"Carim" wrote:

Hi,

Believe you are looking for something like :

If Sheet.Name = Text(month(yourcell),"mmm") then
your code
End If

HTH
Cheers
Carim