Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save options


I have a Print macro button on my spreadsheet that sets the print area,
hides certain rows and prints.
Is there a bit of VB that will let me set up the save options much like
the 'Save As' option.
ie File name, and where to save.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=518959

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Save options

Hi grahammal

You can use this GetSaveAsFilename

Example that use SaveCopyAs to save the activeworkbook

Sub Test()
Dim fname As Variant
Dim Wb As Workbook
Set Wb = ActiveWorkbook

Again:
fname = Application.GetSaveAsFilename("", _
fileFilter:="Excel Files (*.xls), *.xls")
If fname = False Then Exit Sub
If Dir(fname) < "" Then GoTo Again
Wb.SaveCopyAs fname
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"grahammal" wrote in message
...

I have a Print macro button on my spreadsheet that sets the print area,
hides certain rows and prints.
Is there a bit of VB that will let me set up the save options much like
the 'Save As' option.
ie File name, and where to save.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=518959



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


I have tailored your answer to my query to include the date and time.

Dim fname As Variant
Dim Wb As Workbook
Set Wb = ActiveWorkbook

Again:
fname = Application.GetSaveAsFilename("Book6 " & Date & " " & Time, _
fileFilter:="Excel Files (*.xls), *.xls")
If fname = False Then Exit Sub
If Dir(fname) < "" Then GoTo Again
Wb.SaveCopyAs fname

How do I get it to always save in a default location.
ie D:\My Documents\Excel


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=518959

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 and SAVE AS options disappeared from the drop down FILE menu [email protected] Excel Discussion (Misc queries) 2 July 12th 07 09:14 AM
Save options [email protected] Excel Discussion (Misc queries) 0 August 12th 06 01:30 PM
Save options [email protected] New Users to Excel 0 August 12th 06 01:30 PM
How do I set Save Options? DeweyG Excel Discussion (Misc queries) 1 September 14th 05 01:35 AM
How can I save an other route in my Tools bar-options-save? IT bazinoz Excel Discussion (Misc queries) 0 April 23rd 05 05:08 AM


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