Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Please advice

Posted on 2011-02-15
4
Medium Priority
?
239 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 2000 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

719 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