Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to load these XLS files
I am receiving workbooks from someone who is using the filename a
follows : <TodaysDate NW AB.XLS For example today i received a workbook with this filname... 180704 NW AB.xls and tomorrow i will receive a workbook named 190704 NW AB.xls Also the received files are stored in C:\CASTLE\NORTH WEST\ Please could someone tell me how to programmatically write some code t auto load the file received without having to browse for th file.Obviously it has something to do with Format Date but am unsure f exactly how to do this. Also before loading the file i want to copy th received file into D:\RECEIVED\NORTH WEST\ Thanks in advance -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to load these XLS files
Workbooks.Open Filename:= "C:\CASTLE\NORTH WEST\" & _ Format(Date,"ddmmyy") & " NW AB.xls" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jako " wrote in message ... I am receiving workbooks from someone who is using the filename as follows : <TodaysDate NW AB.XLS For example today i received a workbook with this filname... 180704 NW AB.xls and tomorrow i will receive a workbook named 190704 NW AB.xls Also the received files are stored in C:\CASTLE\NORTH WEST\ Please could someone tell me how to programmatically write some code to auto load the file received without having to browse for the file.Obviously it has something to do with Format Date but am unsure fo exactly how to do this. Also before loading the file i want to copy the received file into D:\RECEIVED\NORTH WEST\ Thanks in advance. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to load these XLS files
Dim s1 as String, s2 as Strnig, sName as String
s1 = "C:\CASTLE\NORTH WEST\" s2 = "D:\RECEIVED\NORTH WEST\" sName = format(Date,"ddmmyy") & " NW AB.xls" filecopy s1 & sName, s2 & sName workbooks.open s1 & sName -- Regards, Tom Ogilvy "Jako " wrote in message ... I am receiving workbooks from someone who is using the filename as follows : <TodaysDate NW AB.XLS For example today i received a workbook with this filname... 180704 NW AB.xls and tomorrow i will receive a workbook named 190704 NW AB.xls Also the received files are stored in C:\CASTLE\NORTH WEST\ Please could someone tell me how to programmatically write some code to auto load the file received without having to browse for the file.Obviously it has something to do with Format Date but am unsure fo exactly how to do this. Also before loading the file i want to copy the received file into D:\RECEIVED\NORTH WEST\ Thanks in advance. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to load these XLS files
Many thanks that works a treat.
Could you please tell me how i delete the file from "C:\CASTLE\NORTH WEST\" after copying it. Also i don't want to be prompted if i want to delete the file. Cheer -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to load these XLS files
Name is actually a move, not a copy. I'm sure you could do the
name command, then open the sheet on the D: drive to use it. A little modification of Tom's code should do the trick. But, for future reference, the keyword to look up in help is KILL. "Jako " wrote in message ... Many thanks that works a treat. Could you please tell me how i delete the file from "C:\CASTLE\NORTH WEST\" after copying it. Also i don't want to be prompted if i want to delete the file. Cheers --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to load these XLS files
Oops. Sorry. Name doesn't work across devices. I guess you do need the
KILL after all. "Tim Coddington" wrote in message ... Name is actually a move, not a copy. I'm sure you could do the name command, then open the sheet on the D: drive to use it. A little modification of Tom's code should do the trick. But, for future reference, the keyword to look up in help is KILL. "Jako " wrote in message ... Many thanks that works a treat. Could you please tell me how i delete the file from "C:\CASTLE\NORTH WEST\" after copying it. Also i don't want to be prompted if i want to delete the file. Cheers --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Files won't load from shortcut on email | Excel Discussion (Misc queries) | |||
How do I load files from a CD? | Excel Discussion (Misc queries) | |||
75seconds to load excel files | Excel Discussion (Misc queries) | |||
xcel files will not automatically load | Setting up and Configuration of Excel | |||
Load all files in a directory | Excel Discussion (Misc queries) |