+ Reply to Thread
Results 1 to 6 of 6

Printing a running date

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Printing a running date

    Hello All!

    I would like to create a macro that can print multiple dates on the same spreadsheet.

    The desired output would look like this:

    Copy 1 - Date: 7/8/13
    Copy 2 - Date: 7/9/13
    Copy 3 - Date: 7/10/13
    and so on...

    Would it be possible to create a macro that could run the next 30 or 60 days? (I've been scratching my head for the last week or so and google isn't returning any results; maybe because I can't figure out the correct term.)

    Any help would be great.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Printing a running date

    Hi, Kahm111,

    if I fully understand you have a date in one cell of the sheet and print that sheet with a different date for 30 days. Adjust the address for the cell to suit and try (maybe change the counter to a smaller number when testing)

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    07-08-2013
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Printing a running date

    Hi Hahobe!

    Thanks for your quick and friendly response. I'm familiar with formulas--not so much with coding. Would you mind explaining how I would get this particular code to work? I've inserted this into the code workspace for the spreadsheet.

    Kahm

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Printing a running date

    Hi, Kahm111,

    you may find the following quote helpfull:
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    07-08-2013
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Printing a running date

    Holger,

    THANK YOU SO MUCH! You are fantastic!

    Thanks again,
    Kahm

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Printing a running date

    Hi, Kahm111,

    thanks for the feedback - please mark this thread as Solved via Thread Tools.

    Ciao,
    Holger
    Last edited by HaHoBe; 07-15-2013 at 12:37 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1