Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change location of where file is stored
All
The following is an extract of a macro / vba code that Tom has been able to help me with. Tom / All - would anyone be able to advise how I can make the text file to actually be saved in a certain location instead of currently saving in the same area that the xl spreadsheet is, e.g. instead of saving currently in same path as the spreadsheet force it to save the text file in M:\Spreadsheet\Text Files Below is the code: Application.DisplayAlerts = False wkbk.SaveAs FileName:=ThisWorkbook.Path _ & "\" & rngName.Value & ".txt", FileFormat:=xlText Application.DisplayAlerts = True wkbk.Close SaveChanges:=False Thanks very much. Al ( ) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change location of where file is stored
Al
Change as below...... wkbk.SaveAs Filename:="M:\Spreadsheet\Text Files\" _ & rngName.Value & ".txt", FileFormat:=xlText Gord Dibben Excel MVP - XL97 SR2 & XL2002 On 19 Jul 2003 23:24:28 GMT, (MrAlMackay) wrote: All The following is an extract of a macro / vba code that Tom has been able to help me with. Tom / All - would anyone be able to advise how I can make the text file to actually be saved in a certain location instead of currently saving in the same area that the xl spreadsheet is, e.g. instead of saving currently in same path as the spreadsheet force it to save the text file in M:\Spreadsheet\Text Files Below is the code: Application.DisplayAlerts = False wkbk.SaveAs FileName:=ThisWorkbook.Path _ & "\" & rngName.Value & ".txt", FileFormat:=xlText Application.DisplayAlerts = True wkbk.Close SaveChanges:=False Thanks very much. Al ( ) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change location of where file is stored
Application.DisplayAlerts = False wkbk.SaveAs FileName:="M:\Spreadsheet\Text Files\" _ & rngName.Value & ".txt", FileFormat:=xlText Application.DisplayAlerts = True wkbk.Close SaveChanges:=False -- Regards, Tom Ogilvy MrAlMackay wrote in message ... All The following is an extract of a macro / vba code that Tom has been able to help me with. Tom / All - would anyone be able to advise how I can make the text file to actually be saved in a certain location instead of currently saving in the same area that the xl spreadsheet is, e.g. instead of saving currently in same path as the spreadsheet force it to save the text file in M:\Spreadsheet\Text Files Below is the code: Application.DisplayAlerts = False wkbk.SaveAs FileName:=ThisWorkbook.Path _ & "\" & rngName.Value & ".txt", FileFormat:=xlText Application.DisplayAlerts = True wkbk.Close SaveChanges:=False Thanks very much. Al ( ) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to change location of Personal file | Excel Discussion (Misc queries) | |||
How do I change the default log file location? | Excel Discussion (Misc queries) | |||
How do I change the default log file location? | Setting up and Configuration of Excel | |||
Change of default file location | Excel Discussion (Misc queries) | |||
where is the original data location in a worksheet stored? | Excel Worksheet Functions |