Discussion:
Save Extension
(too old to reply)
Jason Zischke
2006-10-16 01:49:01 UTC
Permalink
Hi All,

I have a workbook that has a save function that saves out a certain sheet
and puts a custom extension on it other than "*.xls". However when I put it
on this one computer it puts my extension on and then the ".xls" extension
on. How can I stop this?

Jason
NickHK
2006-10-16 07:14:12 UTC
Permalink
Jason,
How are you doing you .Save ?
I suspect all computers have the double extension, but because they are set
to hide known extensions, you just don't see it.

NickHK
Post by Jason Zischke
Hi All,
I have a workbook that has a save function that saves out a certain sheet
and puts a custom extension on it other than "*.xls". However when I put it
on this one computer it puts my extension on and then the ".xls" extension
on. How can I stop this?
Jason
Jason Zischke
2006-10-16 22:21:01 UTC
Permalink
Hi NickHK

Thanks for the reply, but I think I need o explain this better. What happens
is when excel saves it adds on the *.xls extension which when my custom open
dialog is used it doesn't show them it only looks for my custom extensions
which are *.Quote, *.Contract & *.Eti, my code is shown below.

FileSaveName = QuoteNumber & CustomerName & AccountName & ".Quote"

ActiveWorkbook.SaveAs FileName:=FileSaveName, FileFormat:=xlNormal,
WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False

Jason
Post by NickHK
Jason,
How are you doing you .Save ?
I suspect all computers have the double extension, but because they are set
to hide known extensions, you just don't see it.
NickHK
Post by Jason Zischke
Hi All,
I have a workbook that has a save function that saves out a certain sheet
and puts a custom extension on it other than "*.xls". However when I put
it
Post by Jason Zischke
on this one computer it puts my extension on and then the ".xls" extension
on. How can I stop this?
Jason
NickHK
2006-10-18 02:09:46 UTC
Permalink
Jason,
AFAIK, you cannot achieve this in a single step.
You actually want the file to be in XL format, but with your custom
extension ?
So .SaveAs normally, close the WB (or use .SaveCopyAs) the rename the file.

Name MyFile.xls As MyFile.Quote
using the full path as applicable, on a closed WB.

NickHK
Post by Jason Zischke
Hi NickHK
Thanks for the reply, but I think I need o explain this better. What happens
is when excel saves it adds on the *.xls extension which when my custom open
dialog is used it doesn't show them it only looks for my custom extensions
which are *.Quote, *.Contract & *.Eti, my code is shown below.
FileSaveName = QuoteNumber & CustomerName & AccountName & ".Quote"
ActiveWorkbook.SaveAs FileName:=FileSaveName, FileFormat:=xlNormal,
WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
Jason
Post by NickHK
Jason,
How are you doing you .Save ?
I suspect all computers have the double extension, but because they are set
to hide known extensions, you just don't see it.
NickHK
Post by Jason Zischke
Hi All,
I have a workbook that has a save function that saves out a certain sheet
and puts a custom extension on it other than "*.xls". However when I put
it
Post by Jason Zischke
on this one computer it puts my extension on and then the ".xls" extension
on. How can I stop this?
Jason
Continue reading on narkive:
Loading...