Consulting

Results 1 to 4 of 4

Thread: convert a number into month

  1. #1

    convert a number into month

    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

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    You could use:
    [VBA]format(dateserial(2007, n, 1),"mmmm")[/VBA]
    where n is your number.
    You can set the picture property of a commandbutton on a userform, or use an image control.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    thnx ...
    I know the first one - but image control, how does that work?!

  4. #4
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    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)
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •