Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default File Save As macro for users with different paths


Below I have a sub routine that needs to be modified to enable multiple users
with different paths to the same file location on a network drive to save the
file using this macro. The only difference in location is the letter of the
drive. On my computer it is identified as "N:", but on another user's
computer it could be identified as any letter of the alphabet. Any simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy & "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default File Save As macro for users with different paths

Check if path exists and if not provide a browse option to pick the folder..

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.InitialFileName = "N:\"
.Show
strFolder = .SelectedItems(1)
End With

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Below I have a sub routine that needs to be modified to enable multiple users
with different paths to the same file location on a network drive to save the
file using this macro. The only difference in location is the letter of the
drive. On my computer it is identified as "N:", but on another user's
computer it could be identified as any letter of the alphabet. Any simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy & "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default File Save As macro for users with different paths


Hey!! Why dont you try the UNC path instead of the mapped drive...If you are
not sure check out with your network administrator...which would be same for
all users within the network.

\\servername\volumename\share\folder\

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Check if path exists and if not provide a browse option to pick the folder..

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.InitialFileName = "N:\"
.Show
strFolder = .SelectedItems(1)
End With

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Below I have a sub routine that needs to be modified to enable multiple users
with different paths to the same file location on a network drive to save the
file using this macro. The only difference in location is the letter of the
drive. On my computer it is identified as "N:", but on another user's
computer it could be identified as any letter of the alphabet. Any simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy & "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default File Save As macro for users with different paths

what does UNC stand for?

"Jacob Skaria" wrote:

Hey!! Why dont you try the UNC path instead of the mapped drive...If you are
not sure check out with your network administrator...which would be same for
all users within the network.

\\servername\volumename\share\folder\

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Check if path exists and if not provide a browse option to pick the folder..

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.InitialFileName = "N:\"
.Show
strFolder = .SelectedItems(1)
End With

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Below I have a sub routine that needs to be modified to enable multiple users
with different paths to the same file location on a network drive to save the
file using this macro. The only difference in location is the letter of the
drive. On my computer it is identified as "N:", but on another user's
computer it could be identified as any letter of the alphabet. Any simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy & "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default File Save As macro for users with different paths

Universal Naming Convention

http://support.microsoft.com/kb/141941

--
Rick (MVP - Excel)


"iperlovsky" wrote in message
...
what does UNC stand for?

"Jacob Skaria" wrote:

Hey!! Why dont you try the UNC path instead of the mapped drive...If you
are
not sure check out with your network administrator...which would be same
for
all users within the network.

\\servername\volumename\share\folder\

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Check if path exists and if not provide a browse option to pick the
folder..

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.InitialFileName = "N:\"
.Show
strFolder = .SelectedItems(1)
End With

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Below I have a sub routine that needs to be modified to enable
multiple users
with different paths to the same file location on a network drive to
save the
file using this macro. The only difference in location is the letter
of the
drive. On my computer it is identified as "N:", but on another
user's
computer it could be identified as any letter of the alphabet. Any
simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy
& "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default File Save As macro for users with different paths

ALWAYS use the UNC. I learned that lesson a long time ago.
Good luck,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Rick Rothstein" wrote:

Universal Naming Convention

http://support.microsoft.com/kb/141941

--
Rick (MVP - Excel)


"iperlovsky" wrote in message
...
what does UNC stand for?

"Jacob Skaria" wrote:

Hey!! Why dont you try the UNC path instead of the mapped drive...If you
are
not sure check out with your network administrator...which would be same
for
all users within the network.

\\servername\volumename\share\folder\

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Check if path exists and if not provide a browse option to pick the
folder..

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.InitialFileName = "N:\"
.Show
strFolder = .SelectedItems(1)
End With

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Below I have a sub routine that needs to be modified to enable
multiple users
with different paths to the same file location on a network drive to
save the
file using this macro. The only difference in location is the letter
of the
drive. On my computer it is identified as "N:", but on another
user's
computer it could be identified as any letter of the alphabet. Any
simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy
& "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default File Save As macro for users with different paths

Forgot the links:
http://www.uwplatt.edu/oit/terms/uncpath.html

http://en.wikipedia.org/wiki/Path_(computing)

http://en.wikipedia.org/wiki/Path_(c...ing_Convention

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Rick Rothstein" wrote:

Universal Naming Convention

http://support.microsoft.com/kb/141941

--
Rick (MVP - Excel)


"iperlovsky" wrote in message
...
what does UNC stand for?

"Jacob Skaria" wrote:

Hey!! Why dont you try the UNC path instead of the mapped drive...If you
are
not sure check out with your network administrator...which would be same
for
all users within the network.

\\servername\volumename\share\folder\

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Check if path exists and if not provide a browse option to pick the
folder..

With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.InitialFileName = "N:\"
.Show
strFolder = .SelectedItems(1)
End With

If this post helps click Yes
---------------
Jacob Skaria


"iperlovsky" wrote:

Below I have a sub routine that needs to be modified to enable
multiple users
with different paths to the same file location on a network drive to
save the
file using this macro. The only difference in location is the letter
of the
drive. On my computer it is identified as "N:", but on another
user's
computer it could be identified as any letter of the alphabet. Any
simple
solutions to this issue?

Sub saveNew()
yyyy = Format(Range("M1").Value, "yyyy")
mmddyyyy = Format(Range("M1").Value, "mm-dd-yyyy")
mmddyy = Range("M2").Value

ActiveWorkbook.SaveAs Filename:="N:\FOLDER\FOLDER 2\folder 3\" & yyyy
& "\"
& mmddyyyy & " Distribution" & "\Rates " & mmddyy & ".xls"

End Sub



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
how do I block users to save the excel file if conditions not met Jonathan Excel Discussion (Misc queries) 1 August 18th 09 07:36 AM
Macro paths wrong after save Kevin M[_2_] Excel Discussion (Misc queries) 3 April 17th 07 03:24 PM
NOT allow users to save XLS file when viewing over web BG Excel Programming 0 April 21st 05 05:39 PM
Help - Automating a file.. Adding Users , Deleting users, Changing Tim Harding Excel Worksheet Functions 0 March 16th 05 01:25 PM
Save File to Another Directory, but not change Users File Save location Mike Knight Excel Programming 1 May 28th 04 09:06 PM


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