![]() |
|
|
|
#1
|
||||
|
||||
|
Below is what I get from Code:
sDestPath = Application.GetSaveAsFilename(, , , Title:="Set destination dir") |
|
#2
|
|||
|
|||
|
OK Thanks, How do I put this code in the macro below:
Code:
Sub SAVEAS()
'
' SAVEAS Macro
'
'
ChDir "J:\ProgramOps\Exceptions Masters & Data\Aon Hewitt"
ActiveWorkbook.SAVEAS Filename:= _
"J:\ProgramOps\Exceptions Masters & Data\Aon Hewitt\Aon Hewitt Exceptions 07-07-14.xlsx" _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Sheets("IMPORT-SAVE").Select
ActiveWindow.SelectedSheets.Delete
ActiveWorkbook.Save
Application.Left = 58.75
Application.Top = 41.5
Sheets("Hewitt Delayed Retirement Plans").Select
Range("E25").Select
Sheets("Retirement Update").Select
Range("G19").Select
End Sub
|
|
#3
|
||||
|
||||
|
Replace your .SAVEAS command with mine.
A tip - I recommend not using "reserved words" for user names. Even sub MySaveAs() is better, although an even more descriptive name could be used. If you're going to work with code I would suggest getting real good with the Immediate window (debug window) in the VBA interface, and F8 and shift-F8 to step through code, and shift-F9 to inspect or watch variables. Then you can follow the code line by line and observe what it does. |
|
#4
|
|||
|
|||
|
Replace your .SAVEAS command with mine (Not sure what you mean)
Can you show me? Code:
Sub Saveandget()
FileName = Application.GetSaveAsFilename
MsgBox (FileName)
ThisWorkbook.saveas (FileName)
Sheets("UPDATE").Select
ActiveWindow.SelectedSheets.Delete
End Sub
|
|
#5
|
|||
|
|||
|
I tried the code Bob gave me and it works except it goes to my C Drive and I want the path to be another network drive. How do I write that in.
Path = J:\ProgramOps\Exceptions Masters & Data\JPM\ Code:
Sub Saveandget()
FileName = Application.GetSaveAsFilename
MsgBox (FileName)
ThisWorkbook.saveas (FileName)
Sheets("UPDATE").Select
ActiveWindow.SelectedSheets.Delete
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to save as pdf with ability to choose save as folder
|
rvessio | Word VBA | 4 | 07-25-2016 12:37 PM |
Outlook 2010 Macro Save as MSG, Choose Destination, set default filename
|
rslck | Outlook | 1 | 06-19-2014 10:16 AM |
Save As Macro that changes the file name also
|
rosscortb | Word VBA | 5 | 05-19-2014 08:40 AM |
| How do I save a Word file with a macro for distribution? | leemoreau | Word VBA | 3 | 10-04-2013 08:06 AM |
Word Macro: Save file as text with current file name
|
jabberwocky12 | Word VBA | 2 | 10-22-2010 12:23 PM |