Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing to different drive and directory
Hi,
I'm trying to run some code and part of that is to change to a particular drive, directory and folder. Namely: ChDir "H:\Accounting\Journals" However, I find that the excel code ignores this instruction and saves the text file (created via the code) to whatever directory I may have opened last. As I am on a network, is there something else that needs to be included in the code to force Excel to go to the correct drive, etc.? Rob |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing to different drive and directory
Do both
ChDrive "H" ChDir "H:\Accounting\Journals" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rob" <none wrote in message ... Hi, I'm trying to run some code and part of that is to change to a particular drive, directory and folder. Namely: ChDir "H:\Accounting\Journals" However, I find that the excel code ignores this instruction and saves the text file (created via the code) to whatever directory I may have opened last. As I am on a network, is there something else that needs to be included in the code to force Excel to go to the correct drive, etc.? Rob |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing to different drive and directory
Bob Phillips wrote:
Do both ChDrive "H" ChDir "H:\Accounting\Journals" Hi, [quoted text clipped - 10 lines] Rob Sorry to hijack this thread, I've tried this on a task that I have (to print through adobe accrobat to a specific directory as a PDF file), but the directory hasn't changed, It's still one that I accessed previously Any suggestions -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200607/1 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing to different drive and directory
Thanks Bob,
I'll try that when I can next week, but I hope it works (see post from Francois). Rob "Bob Phillips" wrote in message ... Do both ChDrive "H" ChDir "H:\Accounting\Journals" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rob" <none wrote in message ... Hi, I'm trying to run some code and part of that is to change to a particular drive, directory and folder. Namely: ChDir "H:\Accounting\Journals" However, I find that the excel code ignores this instruction and saves the text file (created via the code) to whatever directory I may have opened last. As I am on a network, is there something else that needs to be included in the code to force Excel to go to the correct drive, etc.? Rob |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing to different drive and directory
I haven't come across a problem, and I never use PDF, so no ideas there.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rob" wrote in message ... Thanks Bob, I'll try that when I can next week, but I hope it works (see post from Francois). Rob "Bob Phillips" wrote in message ... Do both ChDrive "H" ChDir "H:\Accounting\Journals" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rob" <none wrote in message ... Hi, I'm trying to run some code and part of that is to change to a particular drive, directory and folder. Namely: ChDir "H:\Accounting\Journals" However, I find that the excel code ignores this instruction and saves the text file (created via the code) to whatever directory I may have opened last. As I am on a network, is there something else that needs to be included in the code to force Excel to go to the correct drive, etc.? Rob |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Changing to different drive and directory
Hi Bob,
Just to let you know adding ChDrive "H" to the procedure worked for me. Thanks again, Rob "Bob Phillips" wrote in message ... I haven't come across a problem, and I never use PDF, so no ideas there. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rob" wrote in message ... Thanks Bob, I'll try that when I can next week, but I hope it works (see post from Francois). Rob "Bob Phillips" wrote in message ... Do both ChDrive "H" ChDir "H:\Accounting\Journals" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Rob" <none wrote in message ... Hi, I'm trying to run some code and part of that is to change to a particular drive, directory and folder. Namely: ChDir "H:\Accounting\Journals" However, I find that the excel code ignores this instruction and saves the text file (created via the code) to whatever directory I may have opened last. As I am on a network, is there something else that needs to be included in the code to force Excel to go to the correct drive, etc.? Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula Link References Change to Startup Directory | Links and Linking in Excel | |||
Target directory & Path | Excel Worksheet Functions | |||
auto file path update when excel sheet moved to another directory. | Excel Discussion (Misc queries) | |||
Drive - Folders - Files | Excel Discussion (Misc queries) | |||
How do I insert the directory path in my Excel file? | Excel Worksheet Functions |