Results 1 to 2 of 2

VBA Code to adjust for dynamic file name

Threaded View

  1. #1
    Registered User
    Join Date
    05-31-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    7

    VBA Code to adjust for dynamic file name

    Hi,
    I am not an expert when it comes to VBA programing; however I often use the macro recorder, and delete items in the code that seem unnecessary.
    Below is the code that I have.

    The problem that I am facing is that the file name "NAV SHEET 070910" changes everyday.

    The 070910 represents the date. The macro will not work unless the file is named "NAV SHEET 070910". How can I change the code to accomodate the changing file name.

    Thanks in advance.
    Windows("NAV SHEET 070910.xls").Activate
        Range("BA3").Select
        Selection.Copy
        Windows("Trial Browse.xls").Activate
        Range("F8:F24").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Application.Run "'Trial Browse.xls'!Start_TTrial"
    Last edited by patelh9; 07-10-2010 at 01:09 PM. Reason: Added Code Tags

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