LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Month/date problems.


the following code does not give me the current month and
date when it creat the new sheet.
On my C1 cell it has the function of =DATE(YEAR(NOW
()),MONTH(NOW()),1). the new creat sheet on C1 cell start
with 01/01/2005 instead of the current month as
04/01/2005.
Can someone help?

---
Sub createsheets()
If MsgBox("Are you very very sure you want to do
this?", vbYesNo,
"Create LOTS of Sheets") = vbYes Then
For i = 1 To Day(DateSerial(Year(Date), Month
(Date) + 1, 0))
Sheets("Sheet1").Copy Befo=Worksheets
(Worksheets.Count)
ActiveSheet.Name = i
Range("C1").Value = i
Next
End If
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count month when date is in day/month/year format ccKennedy Excel Worksheet Functions 6 April 30th 09 03:32 AM
Match Month in Date With Month in Header [email protected] Excel Worksheet Functions 1 August 17th 07 07:46 PM
Date arithmetic: adding 1 month to prior end of month date manxman Excel Worksheet Functions 2 July 14th 06 09:29 PM
Sort month/date/year data using month and date only SMW820 Excel Discussion (Misc queries) 6 June 22nd 06 05:14 PM
=VLOOKUP(1,Nationality!B5:B29,IF(MONTH(date)6,MONTH(date)-6, MON Ali Excel Worksheet Functions 14 January 18th 06 08:20 AM


All times are GMT +1. The time now is 02:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"