Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SAVE & SEND A FILE BASED ON TEXT IN A CELL VIA MACRO | New Users to Excel | |||
How to copy a file into folders that are created based on a list? | Excel Programming | |||
Automatically save file based on cell value | Excel Discussion (Misc queries) | |||
Save as to two folders | Excel Programming | |||
Save as to two folders | Excel Programming |