PDA

View Full Version : convert a number into month



enfantter
09-27-2007, 04:52 AM
does anyone know how to make vba convert a number from a textbox into month (format: "mmm")??

and also by the way, does anyone know whether it is possible to have a picture instead of a button? (so that you have a picture which acts as a button)

/Jackjackjack

rory
09-27-2007, 04:59 AM
You could use:
format(dateserial(2007, n, 1),"mmmm")
where n is your number.
You can set the picture property of a commandbutton on a userform, or use an image control.

enfantter
09-27-2007, 05:02 AM
thnx ...
I know the first one - but image control, how does that work?!

rory
09-27-2007, 05:07 AM
You can add it to the form from the Control Toolbox, set its picture property to the image you want, and use the Click event to run code (just as you would with a commandbutton)