Results 1 to 6 of 6

use a macro to Open a file with a variable filename

Threaded View

  1. #1
    Registered User
    Join Date
    05-24-2010
    Location
    lONDON
    MS-Off Ver
    Excel 2007
    Posts
    7

    use a macro to Open a file with a variable filename

    Hi,

    I'm pretty new to Macros and VB and I am trying to run a marco that opens a file.

    The file name however changes on a daily basis

    "Open Position Client Count (Daily)2010-05-24-01-35-27.xls"

    I can open the file if the filename contained only the date however I'm stuck with the issue of time, the time is diferent every day.

    I have tried to use

    Workbooks.Open Filename:= _
    "T:\crystal_reports\General\Oracle_Web_Trading_Reports\"Open Position Client Count (Daily)" & Format(Date, "yyyy-mm-dd-HH-MM-SS") & ".xls

    But that looks for a file called "Open Position Client Count (Daily)2010-05-24-00-00-00.xls"

    Any ideas?

    Thanks

    Ben
    Last edited by plunkettyplunk; 06-11-2010 at 04:06 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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