Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Save 1 file to different folders based on cell.value

Thanks Chip for your quick answer. I'm getting an error 400 (?) it is saving
only the first value when I have more than one (comma separated).
If I have only one value, no error, no problem.
Any ideas?
Thanks in advance,
Gaba

"Chip Pearson" wrote:

Try code like the following:

Sub AAA()
Dim V As Variant
Dim N As Long
Dim FileName As String
V = Split(Range("E1"), ",")

For N = LBound(V) To UBound(V)
FileName = "C:\" & CStr(V(N)) & "\" & ThisWorkbook.Name
On Error Resume Next
Kill FileName
On Error GoTo 0
ThisWorkbook.SaveCopyAs FileName
Next N
ThisWorkbook.ChangeFileAccess xlReadOnly
Kill ThisWorkbook.FullName
End Sub


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

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
SAVE & SEND A FILE BASED ON TEXT IN A CELL VIA MACRO Pat Baratta New Users to Excel 1 February 26th 07 06:46 AM
How to copy a file into folders that are created based on a list? et10yl Excel Programming 1 November 6th 06 11:40 PM
Automatically save file based on cell value Craig Excel Discussion (Misc queries) 0 February 27th 05 10:01 PM
Save as to two folders HelpMe Excel Programming 1 October 26th 04 10:58 PM
Save as to two folders HelpMe Excel Programming 0 October 26th 04 07:40 PM


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