<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Robust VBA Save-As Technique</title>
	<atom:link href="http://peltiertech.com/WordPress/robust-vba-save-as-technique/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Wed, 23 May 2012 11:03:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/comment-page-1/#comment-200664</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Mon, 26 Mar 2012 11:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2708#comment-200664</guid>
		<description>format the cells in Excel as Number with no decimals, and make sure the column is wide enough to display the entire number. Now exporting as CSV will preserve all digits.</description>
		<content:encoded><![CDATA[<p>format the cells in Excel as Number with no decimals, and make sure the column is wide enough to display the entire number. Now exporting as CSV will preserve all digits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/comment-page-1/#comment-200168</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sun, 25 Mar 2012 05:48:33 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2708#comment-200168</guid>
		<description>Hi Jon Peltier, how about saving the file as .csv;

I am using this

objXlBook.SaveAs csvFileName, XlFileFormat.xlCurrentPlatformText

but the problem here is some data (number) are not getting correctly saved. 
Like 
59829220084018                       -&gt;                    5.98292E+13
24143490084016                       -&gt;                    2.41435E+13

Any advice with will be highly appreciated,

Best Regards,

Sam</description>
		<content:encoded><![CDATA[<p>Hi Jon Peltier, how about saving the file as .csv;</p>
<p>I am using this</p>
<p>objXlBook.SaveAs csvFileName, XlFileFormat.xlCurrentPlatformText</p>
<p>but the problem here is some data (number) are not getting correctly saved.<br />
Like<br />
59829220084018                       -&gt;                    5.98292E+13<br />
24143490084016                       -&gt;                    2.41435E+13</p>
<p>Any advice with will be highly appreciated,</p>
<p>Best Regards,</p>
<p>Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/comment-page-1/#comment-80660</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Wed, 23 Mar 2011 19:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2708#comment-80660</guid>
		<description>Jay -

That problem led to a day or so of unbillable time last year, because it took that long to figure out the intricacies of Save and SaveAs in programs which may be used in Exce l2003 and 2007, what with compatibility mode, macro enabled files, and so forth. Just reading your comment brings back the headache I experienced.

You would have to change the filter in GetSaveAsFilename from &quot;Excel Files (*.xls),*.xls&quot; to something more flexible. 

In 2007:
&quot;Excel Workbook (*.xlsx),*.xlsx, Excel Macro-Enabled Workbook (*.xlsm),*.xlsm, Excel 97-2003 Workbook (*.xls),*.xls&quot;

In 2003:
&quot;Excel Workbook (*.xls),*.xls, Excel 2007 Workbook (*.xlsx),*.xlsx, Excel 2007 Macro-Enabled Workbook (*.xlsm),*.xlsm&quot;

These will show all of the file types listed in the save as type dropdown, and if you don&#039;t specify a FilterIndex, it will select the first type by default.

Then when saving, you will need to use the appropriate xlFileFormat parameter:

In Excel 2003:
xlWorkbookNormal for .xls
51 for .xlsx
52 for .xlsm
(only numerical values, not named constants)

In 2007:
xlOpenXMLWorkbook for .xlsx
xlOpenXMLWorkbookMacroEnabled for .xlsm
xlExcel8 for .xls

And there is some compatibility mode checking that you need to do if you want to save as xlExcel8 in 2007.</description>
		<content:encoded><![CDATA[<p>Jay -</p>
<p>That problem led to a day or so of unbillable time last year, because it took that long to figure out the intricacies of Save and SaveAs in programs which may be used in Exce l2003 and 2007, what with compatibility mode, macro enabled files, and so forth. Just reading your comment brings back the headache I experienced.</p>
<p>You would have to change the filter in GetSaveAsFilename from &#8220;Excel Files (*.xls),*.xls&#8221; to something more flexible. </p>
<p>In 2007:<br />
&#8220;Excel Workbook (*.xlsx),*.xlsx, Excel Macro-Enabled Workbook (*.xlsm),*.xlsm, Excel 97-2003 Workbook (*.xls),*.xls&#8221;</p>
<p>In 2003:<br />
&#8220;Excel Workbook (*.xls),*.xls, Excel 2007 Workbook (*.xlsx),*.xlsx, Excel 2007 Macro-Enabled Workbook (*.xlsm),*.xlsm&#8221;</p>
<p>These will show all of the file types listed in the save as type dropdown, and if you don&#8217;t specify a FilterIndex, it will select the first type by default.</p>
<p>Then when saving, you will need to use the appropriate xlFileFormat parameter:</p>
<p>In Excel 2003:<br />
xlWorkbookNormal for .xls<br />
51 for .xlsx<br />
52 for .xlsm<br />
(only numerical values, not named constants)</p>
<p>In 2007:<br />
xlOpenXMLWorkbook for .xlsx<br />
xlOpenXMLWorkbookMacroEnabled for .xlsm<br />
xlExcel8 for .xls</p>
<p>And there is some compatibility mode checking that you need to do if you want to save as xlExcel8 in 2007.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/comment-page-1/#comment-80620</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Wed, 23 Mar 2011 16:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2708#comment-80620</guid>
		<description>I had a question about saving files with the FIleFormat specified. I ran across this while trying to use your code to save as a xlsm file. I finally figured out that I needed to add FileFormat:=xlOpenXMLWorkbookMacroEnabled to the end of you line that reads ActiveWorkbook.SaveAs sFullName. However, this will save all files in this format, correct? How would you alter the code to possibly send the format in as a parameter with xlsx as the default? This is an awesome piece of code and thanks for any help.</description>
		<content:encoded><![CDATA[<p>I had a question about saving files with the FIleFormat specified. I ran across this while trying to use your code to save as a xlsm file. I finally figured out that I needed to add FileFormat:=xlOpenXMLWorkbookMacroEnabled to the end of you line that reads ActiveWorkbook.SaveAs sFullName. However, this will save all files in this format, correct? How would you alter the code to possibly send the format in as a parameter with xlsx as the default? This is an awesome piece of code and thanks for any help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/comment-page-1/#comment-66437</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Sun, 06 Feb 2011 23:25:26 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2708#comment-66437</guid>
		<description>Darro -

Before this line

&lt;pre class=&quot;vbasmall&quot;&gt;&lt;code&gt;ActiveWorkbook.SaveAs sFullName&lt;/code&gt;&lt;/pre&gt;

you make any necessary changes in the workbook. This includes in your case, copying each worksheet&#039;s contents, and using Paste Special - Value.</description>
		<content:encoded><![CDATA[<p>Darro -</p>
<p>Before this line</p>
<pre class="vbasmall"><code>ActiveWorkbook.SaveAs sFullName</code></pre>
<p>you make any necessary changes in the workbook. This includes in your case, copying each worksheet&#8217;s contents, and using Paste Special &#8211; Value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darro</title>
		<link>http://peltiertech.com/WordPress/robust-vba-save-as-technique/comment-page-1/#comment-66400</link>
		<dc:creator>darro</dc:creator>
		<pubDate>Sun, 06 Feb 2011 20:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=2708#comment-66400</guid>
		<description>Hi, 

How would I use this code to open the save as dialogue so the user can choose the name and save location, but when the file is saved have formulas converted to values?</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>How would I use this code to open the save as dialogue so the user can choose the name and save location, but when the file is saved have formulas converted to values?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

