Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?()

Is it possible to change this code to show which directory the SAVE.AS should
use asthe default?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?()

Tools -- Options -- General Tab -- Default file location:

The above is the menu option to change the default location. You have to
exit MS Excel then reopen it.

I don't see any of the code so if it is some VB code then probably use:

Sub DefaultLocation()
Dim strSaveAs As String
strSaveAs = Application.DefaultFilePath
MsgBox strSaveAs
End Sub

"Paul Dennis" wrote:

Is it possible to change this code to show which directory the SAVE.AS should
use asthe default?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Command Button Save As Application.ExecuteExcel4Macro ("SAVE.A

I don't want to change the dafault location for all xls files, just the one
with this button, i.e. they press the button and it shows the save as pop up
dafaulting to the directory of my choice, but just for this one xls.

The code I'm using is

Private Sub SaveForm_Click()
Application.ExecuteExcel4Macro ("SAVE.AS?()")
End Sub

and I want the default location to be "C:\Service Improvement\ToDo"

"Mallasch" wrote:

Tools -- Options -- General Tab -- Default file location:

The above is the menu option to change the default location. You have to
exit MS Excel then reopen it.

I don't see any of the code so if it is some VB code then probably use:

Sub DefaultLocation()
Dim strSaveAs As String
strSaveAs = Application.DefaultFilePath
MsgBox strSaveAs
End Sub

"Paul Dennis" wrote:

Is it possible to change this code to show which directory the SAVE.AS should
use asthe default?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Command Button Save As Application.ExecuteExcel4Macro ("SAVE.A

This kind of thing works for a mapped drive:

Option Explicit
Private Sub SaveForm_Click()

Dim CurFolder As String
Dim NewFolder As String
Dim TestStr As String

CurFolder = CurDir
NewFolder = "C:\Service Improvement\ToDo"

TestStr = ""
On Error Resume Next
TestStr = Dir(NewFolder & "\nul")
On Error GoTo 0

If TestStr = "" Then
MsgBox "design error!"
Else
ChDrive NewFolder
ChDir NewFolder
End If

Application.Dialogs(xlDialogSaveAs).Show

ChDrive CurFolder
ChDir CurFolder

End Sub

Paul Dennis wrote:

I don't want to change the dafault location for all xls files, just the one
with this button, i.e. they press the button and it shows the save as pop up
dafaulting to the directory of my choice, but just for this one xls.

The code I'm using is

Private Sub SaveForm_Click()
Application.ExecuteExcel4Macro ("SAVE.AS?()")
End Sub

and I want the default location to be "C:\Service Improvement\ToDo"

"Mallasch" wrote:

Tools -- Options -- General Tab -- Default file location:

The above is the menu option to change the default location. You have to
exit MS Excel then reopen it.

I don't see any of the code so if it is some VB code then probably use:

Sub DefaultLocation()
Dim strSaveAs As String
strSaveAs = Application.DefaultFilePath
MsgBox strSaveAs
End Sub

"Paul Dennis" wrote:

Is it possible to change this code to show which directory the SAVE.AS should
use asthe default?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default Command Button Save As Application.ExecuteExcel4Macro ("SAVE.A

thanks - I tried it but it didn't change anything, still pointing to the
current directory.

"Dave Peterson" wrote:

This kind of thing works for a mapped drive:

Option Explicit
Private Sub SaveForm_Click()

Dim CurFolder As String
Dim NewFolder As String
Dim TestStr As String

CurFolder = CurDir
NewFolder = "C:\Service Improvement\ToDo"

TestStr = ""
On Error Resume Next
TestStr = Dir(NewFolder & "\nul")
On Error GoTo 0

If TestStr = "" Then
MsgBox "design error!"
Else
ChDrive NewFolder
ChDir NewFolder
End If

Application.Dialogs(xlDialogSaveAs).Show

ChDrive CurFolder
ChDir CurFolder

End Sub

Paul Dennis wrote:

I don't want to change the dafault location for all xls files, just the one
with this button, i.e. they press the button and it shows the save as pop up
dafaulting to the directory of my choice, but just for this one xls.

The code I'm using is

Private Sub SaveForm_Click()
Application.ExecuteExcel4Macro ("SAVE.AS?()")
End Sub

and I want the default location to be "C:\Service Improvement\ToDo"

"Mallasch" wrote:

Tools -- Options -- General Tab -- Default file location:

The above is the menu option to change the default location. You have to
exit MS Excel then reopen it.

I don't see any of the code so if it is some VB code then probably use:

Sub DefaultLocation()
Dim strSaveAs As String
strSaveAs = Application.DefaultFilePath
MsgBox strSaveAs
End Sub

"Paul Dennis" wrote:

Is it possible to change this code to show which directory the SAVE.AS should
use asthe default?


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Command Button Save As Application.ExecuteExcel4Macro ("SAVE.A

I don't have another guess. It works fine for me.

Paul Dennis wrote:

thanks - I tried it but it didn't change anything, still pointing to the
current directory.

"Dave Peterson" wrote:

This kind of thing works for a mapped drive:

Option Explicit
Private Sub SaveForm_Click()

Dim CurFolder As String
Dim NewFolder As String
Dim TestStr As String

CurFolder = CurDir
NewFolder = "C:\Service Improvement\ToDo"

TestStr = ""
On Error Resume Next
TestStr = Dir(NewFolder & "\nul")
On Error GoTo 0

If TestStr = "" Then
MsgBox "design error!"
Else
ChDrive NewFolder
ChDir NewFolder
End If

Application.Dialogs(xlDialogSaveAs).Show

ChDrive CurFolder
ChDir CurFolder

End Sub

Paul Dennis wrote:

I don't want to change the dafault location for all xls files, just the one
with this button, i.e. they press the button and it shows the save as pop up
dafaulting to the directory of my choice, but just for this one xls.

The code I'm using is

Private Sub SaveForm_Click()
Application.ExecuteExcel4Macro ("SAVE.AS?()")
End Sub

and I want the default location to be "C:\Service Improvement\ToDo"

"Mallasch" wrote:

Tools -- Options -- General Tab -- Default file location:

The above is the menu option to change the default location. You have to
exit MS Excel then reopen it.

I don't see any of the code so if it is some VB code then probably use:

Sub DefaultLocation()
Dim strSaveAs As String
strSaveAs = Application.DefaultFilePath
MsgBox strSaveAs
End Sub

"Paul Dennis" wrote:

Is it possible to change this code to show which directory the SAVE.AS should
use asthe default?


--

Dave Peterson


--

Dave Peterson
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
Cannot save excel files to a folder on a network Robbie Excel Discussion (Misc queries) 1 June 9th 06 07:26 AM
macro save a workbook whilst increasing file no shrek Excel Worksheet Functions 0 November 10th 05 02:40 PM
Save as Msg box monster Excel Discussion (Misc queries) 3 August 31st 05 06:45 PM
Save as Msg box Bob Umlas, Excel MVP Excel Discussion (Misc queries) 0 August 29th 05 09:56 PM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM


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