ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   month problem (https://www.excelbanter.com/excel-programming/313990-month-problem.html)

tom1646

month problem
 
Hi,

In my macro i would like to take the current date object and extract the
month value. then convert this (assuming it isn't already in the correct
form) to the form Jan, Feb, Mar, Apr etc. and then compare this to the column
headers that i have. If it matches then a cell should be updated to match
the color of the cell under the matching column header. I am stuck on the
date part because i do not now how to extract the current date using vba, is
it possible?

Any help with other parts would be greatfully recieved.

Thanks, Tom




Tom Ogilvy

month problem
 
Dim sStr as String
sStr = Format(date,"mmm")

--
Regards,
Tom Ogilvy


"tom1646" wrote in message
...
Hi,

In my macro i would like to take the current date object and extract the
month value. then convert this (assuming it isn't already in the correct
form) to the form Jan, Feb, Mar, Apr etc. and then compare this to the

column
headers that i have. If it matches then a cell should be updated to match
the color of the cell under the matching column header. I am stuck on the
date part because i do not now how to extract the current date using vba,

is
it possible?

Any help with other parts would be greatfully recieved.

Thanks, Tom







All times are GMT +1. The time now is 09:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com