#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default save as

As I understand you want the user to insert the filename, but you want to
define the path. When this is correct try to input the filename in an
inputbox as following:

Dim sFileName As String
Dim sDirName As String
sFileName = InputBox("Input Filename", "Input", "")
sDirName = "D:\My Documents\"
ActiveWorkbook.SaveAs Filename:=sDirName & sFileName, FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:= _
False, CreateBackup:=False

Regards
Klaus





"Vergel Adriano" wrote:

Geebee,

you can use the SaveAs method of the workbook object. For example

Dim sFileName As Sting
sFileName="C:\Temp\Book1.xls"
ActiveWorkbook.SaveAs sFilename


--
Hope that helps.

Vergel Adriano


"geebee" wrote:

hi,

i have the following:

Dim sFileName As Sting
sFileName = Application.GetSaveAsFilename

I would like to know how to avoid displaying the file saver dialog box that
lets you choose the path. I would like to specify the path programatically.
Can anyone help with this?

thanks in advance,
geebee

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, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
How to diasble save and save as menu but allow a save button hon123456 Excel Programming 1 June 12th 06 09:50 AM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM


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