+ Reply to Thread
Results 1 to 3 of 3

Open changing name files with macro

Hybrid View

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    13

    Open changing name files with macro

    Hello everyone,

    I'm creating a spreadsheet at work and ran into an issue I'm hoping to get some help with:

    I have a few columns, A,B,C which I would like to populate with new numbers and dates on a daily basis.

    I wanted to accomplish this using a macro that would:

    My question is how to:
    1) open a workbook with the date as it's title (i.e. 072710.xls) which will change continuously
    Question: How do I look for a file who's title will increment in a date format?

    Any assistance would be greatly appreciated,
    thanks guys, this forum is fantastic!
    Last edited by g4getmoney; 07-27-2010 at 11:49 AM. Reason: Solved.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Open changing name files with macro

    Somethink like this:

    Workbooks.Open "H:\" & Format(Date, "mmddyy") & ".xls"

    Will open the workbook for today's date.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    07-09-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Open changing name files with macro

    Worked like a charm, thank you.

    Quote Originally Posted by Domski View Post
    Somethink like this:

    Workbooks.Open "H:\" & Format(Date, "mmddyy") & ".xls"

    Will open the workbook for today's date.

    Dom

+ 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