Solved

Please advice

Posted on 2011-02-15
4
237 Views
Last Modified: 2012-05-11
I want to check a excell sheet which reside under a folder like C:/Temp/2/14/11/test.xls for February 14th file and like C:/Temp/02/15/11/test.xls. for Feb 15th file and so on....
Please advice me the VBA code to read the file everyday to check.

Your prompt response would be highly appreciated.
0
Comment
Question by:alam747
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
tbsgadi earned 500 total points
ID: 34904346
Something like this:
Gary
Dim ObjEx As Excel.Application
Set ObjEx = New Excel.Application

With ObjEx

       .Workbooks.Open FileName:="C:/Temp/" & Format(Date, "m/dd/yy") & "/test.xls"
end with

...

Open in new window

0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 34908012
I also recommend changing the format to C:/Temp/2011/02/14/test.xls so that the sorting will make sense and all the data will be grouped into folders by year. The way you have it currently, the folders will be grouped in very strange ways.

The yyyy/mm/dd format is what most people in industry use for filenames and paths.
0
 

Author Closing Comment

by:alam747
ID: 34908847
Thanks a lot , it helps
0
 
LVL 46

Expert Comment

by:tbsgadi
ID: 34908984
Glad to help!
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question