exporting to an excel sheet (1 Viewer)

dolano

2nd cousin of Rincewind
Local time
Today, 06:12
Joined
Jul 19, 2006
Messages
28
Hi, I wonder if anyone could solve this issue for me. I have a module that will export to an excel sheet and place values in specific rows which is fine, however as it stands the exact file path of the excel sheet must be present in the code. the problem with this is that the excel sheets name will be changing from week to week, therefore, requiring me (at the moment) to rewrite the path into the VBA code each week.

So, my query is this; is there a way that the code will look in a particular directory and update any files with a .xls extension contained within that directory?

Your time and input is much appriciated.
 

KeithG

AWF VIP
Local time
Yesterday, 22:12
Joined
Mar 23, 2006
Messages
2,592
Yeah you can do that. Search the forum for Files System Object and the DIR function.
 

dolano

2nd cousin of Rincewind
Local time
Today, 06:12
Joined
Jul 19, 2006
Messages
28
Will do thanks
 

Users who are viewing this thread

Top Bottom