Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Maryland, USA
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    marco ask for current mont (2000)

    I am running a macro. What I have created is a cash sheet. I have everything working on my macro except. I cannot get it to fill in the current month in a certain cell 2 and the current year. In lotus All I did was hit the alt key and letter e and it would ask me the current month and year and it would fill in the blank.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: marco ask for current mont (2000)

    If you press control-; you get today's date in the cell. Then format the cell to show the month or the year, whichever you need.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: marco ask for current mont (2000)

    Hold down the Ctrl key and press the semi-colon (Ctrl+[img]/forums/images/smilies/wink.gif[/img]. That will put the current date into the active cell. You can then use Cell from the Format menu to display the month, year, or any combination that you want.
    Legare Coleman

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: marco ask for current mont (2000)

    Inside a macro, you can use the Date function to obtain the current day. So, in your macro, you will need something like <pre> ActiveCell = Date
    ActiveCell.NumberFormat = "mmm yyyy"
    </pre>

    HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

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