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

hi

instead of oBook.SaveAs("c:\datalog.xls"),

how do i open up a dialog to save to a new excel file?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default save file

Hi Newbie,

I am also a newbie, so don't feel alone !!
I have just used the code below which works fine, i am sure it is not
the best, but it works. Critisism will be welcome.

Sub SaveFile()
'
'
Dim myValue As Variant
myValue = Application.InputBox(prompt:="Please enter the file save
name")

ChDir "C:\Datalog\"
ActiveWorkbook.SaveAs Filename:="C:\Datalog\" & myValue & ".xls", _
FileFormat:=xlNormal, CreateBackup:=False

MsgBox "Your file hase been saved as: " & "(" & myValue & ".XLS) " & "in
the datalog folder"
Application.Quit

End Sub

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default save file

Try something like

Dim FName As Variant
FName = Application.GetOpenFilename("Excel files (*.xls),*.xls")
If FName = False Then
' user clicked cancel
Else
ActiveWorkbook.SaveAs Filename:=FName
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"newbie" wrote in message
...
hi

instead of oBook.SaveAs("c:\datalog.xls"),

how do i open up a dialog to save to a new excel file?



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
Excell2003 (SP-1) File > Save and File > Save As.. grayed out Joe Murphy Excel Discussion (Misc queries) 0 March 9th 05 10:00 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM
Excel marcos firing on file save as but not file save Andy Excel Programming 1 August 3rd 04 10:34 AM
Save File to Another Directory, but not change Users File Save location Mike Knight Excel Programming 1 May 28th 04 09:06 PM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


All times are GMT +1. The time now is 02:42 PM.

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"