![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 8
|
here's the problem:
When a user click on an assigned button, i would like to do the following: 1. Present the user with a "Save As" dialog box, BUT with a specific folder location (not the default dir) so users do not have to navigate further... (So far, I can only do the 1st part) 2. User types a filename and click save 3. Continues with the rest of the macro, i.e. Saves the file as HTML... Thank you... |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Look up Help file for more info. Sub MySaveAs() Dim sFileSave As String Dim sFileFrmt As String '// Define your format here sFileFrmt = "xls" '// Define your Dir to saveto here ChDir ("C:AAText") sFileSave = Application.GetSaveAsFilename If sFileSave = "False" Then Exit Sub On Error GoTo ErrSave ActiveWorkbook.SaveAs (sFileSave & sFileFrmt) Exit Sub ErrSave: MsgBox Err.Number & vbCr & _ Err.Description & vbCr _ , vbMsgBoxHelpButton, "Error", Err.HelpFile, Err.HelpContext End Sub |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 8
|
thank you... you're a great help!
I'll be able to adapt it (the macro) further with your macro as a guide... Thanks again! |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|