Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing Save As Type in Save as dialog box

Hello

I was hoping anyone would be able to help me with this
situation

I require code that when it is ran the Save as Dialog Box
opens with a preset filename and the Save Type is Excel
Workbook. The problem i'm having is i have linked this
workbook to a product called GoldMine, and in order for
that to work the workbook must be saved as a template.
However when running the Save as dialog box it stays as a
template so when the user will save this, it will be a
template not a workbook. Can anyone help with this

I currently am using the code

InvoiceNumber = Worksheets("main").Range("j12").Value
Filename = "Invoice " & InvoiceNumber
Application.Dialogs(xlDialogSaveAs).Show (Filename)

So i can get the filename to pull through, i just cant, or
dont know how to change the file type

Any help would be greatly appreciated

Thanks

Phill

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Changing Save As Type in Save as dialog box

Phil,

If you create a new workbook based upon the template rather than opening the
template, the SaveAs will default to a normal Excel workbook.

You can add it in VBA with code like

Workbooks.Add Template:= _
"C:\Documents and Settings\Bob\Application
Data\Microsoft\Templates\Book.xlt"

--

HTH

Bob Phillips

"Phill" wrote in message
...
Hello

I was hoping anyone would be able to help me with this
situation

I require code that when it is ran the Save as Dialog Box
opens with a preset filename and the Save Type is Excel
Workbook. The problem i'm having is i have linked this
workbook to a product called GoldMine, and in order for
that to work the workbook must be saved as a template.
However when running the Save as dialog box it stays as a
template so when the user will save this, it will be a
template not a workbook. Can anyone help with this

I currently am using the code

InvoiceNumber = Worksheets("main").Range("j12").Value
Filename = "Invoice " & InvoiceNumber
Application.Dialogs(xlDialogSaveAs).Show (Filename)

So i can get the filename to pull through, i just cant, or
dont know how to change the file type

Any help would be greatly appreciated

Thanks

Phill



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Changing Save As Type in Save as dialog box


Dim fn As String

InvoiceNumber = Worksheets("main").Range("j12").Value

MyFilename = "Invoice " & InvoiceNumber

fn = Application.GetSaveAsFilename(MyFileName, _
"Excel (*.xls),*.xls", , "Select File Name")
If fn = "False" Then Exit Sub
ThisWorkbook.SaveAs fn, xlWorkbookNormal


I changed FileName to MyFileName - I generally avoid
using key words as variable names.

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
Hello

I was hoping anyone would be able to help me with this
situation

I require code that when it is ran the Save as Dialog

Box
opens with a preset filename and the Save Type is Excel
Workbook. The problem i'm having is i have linked this
workbook to a product called GoldMine, and in order for
that to work the workbook must be saved as a template.
However when running the Save as dialog box it stays as

a
template so when the user will save this, it will be a
template not a workbook. Can anyone help with this

I currently am using the code

InvoiceNumber = Worksheets("main").Range("j12").Value
Filename = "Invoice " & InvoiceNumber
Application.Dialogs(xlDialogSaveAs).Show (Filename)

So i can get the filename to pull through, i just cant,

or
dont know how to change the file type

Any help would be greatly appreciated

Thanks

Phill

.

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
Save as dialog David T Excel Discussion (Misc queries) 7 September 28th 07 05:12 PM
how to get disk icon on save button of save as dialog like 2000 RichT Excel Discussion (Misc queries) 2 March 9th 06 08:13 PM
changing the order shown in the save type menu Michelle Setting up and Configuration of Excel 1 March 18th 05 07:15 AM
Save As Dialog Arne[_2_] Excel Programming 0 July 9th 03 09:18 AM
Save As Dialog Bob Phillips[_5_] Excel Programming 0 July 8th 03 11:09 PM


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