Macros

D

Dava Sutts

Hi

I run a daily download from another system, via a .txt file into Excel.

Each day the WorkSheet has a different name ie A3_12_11_04 then tommorow it
will be A3_13_11_04 etc to represent the date it was downloaded.

I then have to create a macro and pull off some of of the data on a daily
basis...this is where my problem arrisses.

How can my Macro recognise the different Worksheet name on a daily basis? My
2 thoughts would be to get data from another open worksheet or be able to put
a promt in my Maco to search the name of the Worksheet.

Confused...I am!!

Any Help would be welcome.

Thanks
Dave
 
B

BrianB

Perhaps something like this :-

Code
-------------------

Dim MyDate As String
Dim Yesterday As Date
Yesterday = Now() - 1
MyDate = Format(Yesterday, "dd_mm_yy")
Workbooks.Open FileName:="A3_" &MyDate & ".xls"

-------------------
 
Top