Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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 ( )
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change location of Personal file HN007 Excel Discussion (Misc queries) 4 September 16th 09 04:23 PM
How do I change the default log file location? Revs Excel Discussion (Misc queries) 0 November 19th 08 10:49 AM
How do I change the default log file location? Revs Setting up and Configuration of Excel 0 November 18th 08 01:24 PM
Change of default file location Rama Excel Discussion (Misc queries) 1 February 22nd 08 02:09 PM
where is the original data location in a worksheet stored? z.entropic Excel Worksheet Functions 2 December 22nd 07 11:28 PM


All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"