#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving File


I have the following code

Sub SaveAsCSV()
ActiveWorkbook.SaveAs Filename = "\\Fiesta\Wg_memb_sec\Community
Dividend\New Payments\Admin\Chq details\CommDiviChqs.csv", _
FileFormat:=xlCSVWindows, CreateBackup:=False
ActiveWorkbook.Saved = True
ActiveWorkbook.Close

End Sub

When I run the code, the file is saved in the right location but with
the name False.csv.

Can anybody help please.

Thanks in advance

Nick


--
Nick S
------------------------------------------------------------------------
Nick S's Profile: http://www.excelforum.com/member.php...o&userid=16512
View this thread: http://www.excelforum.com/showthread...hreadid=479170

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving File


Hello NIck,

Looks like a typo. You forgot tp put the colon after filename.

FileName:="\\Fiesta\Wg_memb_sec\Community Dividend\New
Payments\Admin\Chq details\CommDiviChqs.csv", _


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=479170

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Saving File

In addition, you can replace these two lines

ActiveWorkbook.Saved = True
ActiveWorkbook.Close

with the much cleaner

ActiveWorkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy

"Leith Ross" wrote
in message ...

Hello NIck,

Looks like a typo. You forgot tp put the colon after filename.

FileName:="\\Fiesta\Wg_memb_sec\Community Dividend\New
Payments\Admin\Chq details\CommDiviChqs.csv", _


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:

http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=479170



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving File


Thanks that was driving me nut

--
Nick
-----------------------------------------------------------------------
Nick S's Profile: http://www.excelforum.com/member.php...fo&userid=1651
View this thread: http://www.excelforum.com/showthread.php?threadid=47917

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
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
Saving worksheet in new file with date AND cell value as file name michaelberrier Excel Discussion (Misc queries) 4 May 26th 06 08:05 PM
Excel should let me sort the file directory when saving a file Beanee70 Excel Discussion (Misc queries) 0 March 14th 06 07:03 AM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
saving an excel file as an ASCII text file without delimiters Sewellst Excel Programming 4 January 7th 05 01:41 PM


All times are GMT +1. The time now is 04:32 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"