Welcome toExcel.Tips.Net
Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site
Adding a Little Animation to Your Life
Converting a Range of URLs to Hyperlinks
Making the Formula Bar Persistent
When creating macros in VBA, you may have a need to know the specific day of the month represented by a particular date. For instance, you may want to determine the day of the month on which the macro is being executed. The following code will do the trick:
iDay = Day(Now())
The Day function returns an integer value representing the day of the month of whatever date you provide. In this example, the Now function represents today's date, and so Day returns today's day of the month.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2502) applies to Microsoft Excel versions: 97 2000 2002 2003 2007
Make Home Buying Less Stressful! Why make home buying harder than it needs to be? Put your mind at ease—discover all the questions you need to ask to make the best buying decision.