Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SaveAs Macro Help?

Can anyone help me debug this section of code?

today = Format(Now, "ddmmmyy")
ActiveWorkbook.SaveAs
Filename:="F:\folder\my_file_" & today & ".txt", FileFormat:=x1Text,
CreateBackup:=False

I'm stumped


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default SaveAs Macro Help?

x1Text

Change to xlText

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"NeuralNetwork" wrote in message ...
Can anyone help me debug this section of code?

today = Format(Now, "ddmmmyy")
ActiveWorkbook.SaveAs
Filename:="F:\folder\my_file_" & today & ".txt", FileFormat:=x1Text,
CreateBackup:=False

I'm stumped


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default SaveAs Macro Help?

Looks suspiciously like a 1 (one) instead of a l (letter L) in the
FileFormat constant.

Try, FileFormat:=xlText

NeuralNetwork wrote:

Can anyone help me debug this section of code?

today = Format(Now, "ddmmmyy")
ActiveWorkbook.SaveAs
Filename:="F:\folder\my_file_" & today & ".txt", FileFormat:=x1Text,
CreateBackup:=False

I'm stumped


---
Message posted from http://www.ExcelForum.com/


--

Cheers
Andy

http://www.andypope.info

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default SaveAs Macro Help?

Dont you want a _ after .SaveAs?



-----Original Message-----
Can anyone help me debug this section of code?

today = Format(Now, "ddmmmyy")
ActiveWorkbook.SaveAs
Filename:="F:\folder\my_file_" & today & ".txt",

FileFormat:=x1Text,
CreateBackup:=False

I'm stumped


---
Message posted from http://www.ExcelForum.com/

.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SaveAs Macro Help?

Endless Thanks! You have made my day!


---
Message posted from http://www.ExcelForum.com/



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
SaveAs in Macro gfkbob[_2_] Excel Discussion (Misc queries) 2 April 12th 07 10:52 PM
SaveAS macro Query Nigel Excel Discussion (Misc queries) 1 May 13th 05 01:17 PM
Saveas Macro Nigel Excel Discussion (Misc queries) 3 May 11th 05 01:15 PM
Error on SaveAs Macro Kevin Excel Programming 1 December 3rd 03 03:58 AM


All times are GMT +1. The time now is 01:19 PM.

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

About Us

"It's about Microsoft Excel"