Jumat, 08 Maret 2013

Re: [ExcelVBA] saving files either as XLS or XLSM

 

I have mine set to .xlsb as default also.
Just to satisfy your curiosity (ok, mine too) I checked.
.xls format for this file was 81Mb.

The way *I* interpreted it is that I THINK he's creating a "multi-purpose"
Before_Save event macro that he can use in multiple files.

He's checking the format of "current" file and then using the GetSaveAsFilename
method to obtain a file name in the appropriate format.

But I could be wrong....

Paul
-----------------------------------------
"Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can." - John Wesley
-----------------------------------------

________________________________
From: David Grugeon <yahoo@grugeon.com.au>
To: ExcelVBA@yahoogroups.com
Sent: Thu, March 7, 2013 4:41:20 PM
Subject: RE: [ExcelVBA] saving files either as XLS or XLSM

 
Hi Paul

I use xlsb too when I can. I have it set as default. I wonder what your 50.2mb
file would be if you saved it as .xls.

One concern I had with this thread, and I am not sure if I am right is that the
procedure seems to be trying to save a file with 2 extensions. You can't do that
and I wonder if that is the issue with the code.

Best Regards
David Grugeon
Excel VBA Group Moderator

-----Original Message-----
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf Of
Paul Schreiner
Sent: Thursday, 7 March 2013 10:34 PM
To: ExcelVBA@yahoogroups.com
Subject: Re: [ExcelVBA] saving files either as XLS or XLSM

As David mentioned, the Excel 2007/2010 file extension for macros is .xlsm

But, just to throw my 2 cents in:

unless you're using xml in your macros, I prefer .xlsb format Microsoft says
it's a "binary" format.

Now, your file might not be very large, and the difference is more noticeable
with large files, but I've found that .xlsb files load faster and macros run
faster than in .xlsm format.
and the file size is much smaller too!

(I have a file that's 50.2Mb as an .xlsm format and takes 15 seconds to load,
in .xlsb format, it's only 15.7Mb and loads in 4 seconds.)

There... that's my 2 cents.

Paul
-----------------------------------------
"Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can." - John Wesley
-----------------------------------------

________________________________
From: David Grugeon <yahoo@grugeon.com.au>
To: ExcelVBA@yahoogroups.com
Sent: Thu, March 7, 2013 2:47:46 AM
Subject: RE: [ExcelVBA] saving files either as XLS or XLSM

You probably don't want .xlm It is .xlsm

Best Regards
David Grugeon
Excel VBA Group Moderator

-----Original Message-----
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf Of
sunnywulf
Sent: Thursday, 7 March 2013 2:33 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] saving files either as XLS or XLSM

I am struggling with this and and hope somebody can help.

A workbook in Excel versions 2003, 2007 or 2010 has macros and need to be saved.
In the Before_Save event I check for the excel version and only allow saving as
XLS for 2003 or XLS or XLM (due to macros) for 2007 and 2010 version.

For 2003, it is easy:
FName = Application.GetSaveAsFilename(FileFilter:="Excel 97-2003 Workbook
(*.xls), *.xls")

But what is the proper command for 2007 and 2010 to set two file filters?
The following doesn't work:
FName = Application.GetSaveAsFilename(FileFilter:="Excel Macro-Enabled Workbook
(*.xlm), *.xlm", "Excel 97-2003 Workbook (*.xls), *.xls")

Your help is greatly appreciated.
Wolfram

------------------------------------

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
here: http://www.mousetrax.com/techtrax to enter the ezine, then search the
ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------Yahoo! Groups Links

[Non-text portions of this message have been removed]

------------------------------------

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here:
http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES
for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar