Macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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"

-------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top