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


Hello!

I was wondering how to call up the "save as" box with code (as if you
went to File and selected Save As...). I tried through the macro
recorder, but it wouldn't let me stop recording when the box was open.

Thanks,
ME


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=473255

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Save as box

You could adapt this:

Sub SaveAs()
Dim flname As String
Dim fullName As Variant
Dim filter As String
flname = "SaveName"
filter = "Excel Files (*.xls), *.xls"
fullName = Application.GetSaveAsFilename(flname, filter, , _
"Save File as...")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
End Sub


Hope this helps
Rowan

EMoe wrote:
Hello!

I was wondering how to call up the "save as" box with code (as if you
went to File and selected Save As...). I tried through the macro
recorder, but it wouldn't let me stop recording when the box was open.

Thanks,
ME


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save as box


Thanks Rowan,

This code works perfectly. This is what I was looking for.

Regards,
EMoe :)


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=473255

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Save as box

You're welcome.

EMoe wrote:
Thanks Rowan,

This code works perfectly. This is what I was looking for.

Regards,
EMoe :)


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
Save As and save current numbers not the actual formulas and links Frank Menard Excel Discussion (Misc queries) 2 November 9th 06 09:18 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
Why system asks me to save change even after I call save method(VB.NET) steellock Excel Programming 2 April 27th 04 04:14 AM


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