Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Saving Excel in more than one location

I have found a macro for word that will do the job and I tried to put it into
excel. But it comes up with an error 405. I was wondering if anyone knew of
a macro that will allow you to save a file to two different locations. And
that it will prompt you for a save location each time. What i am trying to
do is kep a copy on my computer C drive and a copy on a network server, we
have problems with our server. Please help


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200508/1
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Saving Excel in more than one location

How about:

Sub SaveAs()
Dim flName As String
Dim fullName As Variant
Dim filter As String
flName = "SaveName"
filter = "Excel Files (*.xls), *.xls"
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 1")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
fullName = Empty
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 2")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
End Sub

Hope this helps
Rowan

"Mark C via OfficeKB.com" wrote:

I have found a macro for word that will do the job and I tried to put it into
excel. But it comes up with an error 405. I was wondering if anyone knew of
a macro that will allow you to save a file to two different locations. And
that it will prompt you for a save location each time. What i am trying to
do is kep a copy on my computer C drive and a copy on a network server, we
have problems with our server. Please help


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200508/1

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Saving Excel in more than one location

It works perfectly. That is exactly what I am trying to do. Thank you very
much.
Rowan wrote:
How about:

Sub SaveAs()
Dim flName As String
Dim fullName As Variant
Dim filter As String
flName = "SaveName"
filter = "Excel Files (*.xls), *.xls"
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 1")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
fullName = Empty
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 2")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
End Sub

Hope this helps
Rowan

I have found a macro for word that will do the job and I tried to put it into
excel. But it comes up with an error 405. I was wondering if anyone knew of
a macro that will allow you to save a file to two different locations. And
that it will prompt you for a save location each time. What i am trying to
do is kep a copy on my computer C drive and a copy on a network server, we
have problems with our server. Please help



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200508/1
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Saving Excel in more than one location

You're welcome!

"Mark C via OfficeKB.com" wrote:

It works perfectly. That is exactly what I am trying to do. Thank you very
much.
Rowan wrote:
How about:

Sub SaveAs()
Dim flName As String
Dim fullName As Variant
Dim filter As String
flName = "SaveName"
filter = "Excel Files (*.xls), *.xls"
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 1")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
fullName = Empty
fullName = Application.GetSaveAsFilename(flName, filter, , "Save copy 2")
If fullName < False Then
Application.DisplayAlerts = False
ThisWorkbook.SaveAs fullName
Application.DisplayAlerts = True
End If
End Sub

Hope this helps
Rowan

I have found a macro for word that will do the job and I tried to put it into
excel. But it comes up with an error 405. I was wondering if anyone knew of
a macro that will allow you to save a file to two different locations. And
that it will prompt you for a save location each time. What i am trying to
do is kep a copy on my computer C drive and a copy on a network server, we
have problems with our server. Please help



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200508/1

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
Problems saving a worksheet with links to a New Location Excel Worksheet Functions 1 July 7th 06 05:09 PM
VBA for saving a file to a specific location TimT Excel Programming 6 July 7th 05 08:50 PM
problem saving workbook to network location eddie Excel Discussion (Misc queries) 0 April 14th 05 09:28 PM
Saving in a location Greg Brow Excel Programming 2 February 4th 05 02:57 PM
Saving a TXT file keeping its current location Chichifo[_3_] Excel Programming 1 September 7th 04 07:39 PM


All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"