Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming Files w/Excel
I have a simple spreadsheet with 2 columns: Column A has original file names
for a bunch of Acorbat (.pdf) files while Column B has the new filename. I want to read each row, get the original final name from Column A, rename the old file to the new one whose name I have specified in Column B. Is there a simple VBA that can take care of this? Thanks in advance! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming Files w/Excel
Perhaps:
Sub ordinate() For Each cell In Columns("A").SpecialCells(xlCellTypeConstants) Name cell.Value As cell.Offset(0, 1).Value Next cell End Sub -- Gary''s Student - gsnu200775 "Confused VB Person" wrote: I have a simple spreadsheet with 2 columns: Column A has original file names for a bunch of Acorbat (.pdf) files while Column B has the new filename. I want to read each row, get the original final name from Column A, rename the old file to the new one whose name I have specified in Column B. Is there a simple VBA that can take care of this? Thanks in advance! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming Files w/Excel
Thanks for the fast response. But I forgot to mention that I use Excel in
Office2003. Will your VBA work with this version? "Gary''s Student" wrote: Perhaps: Sub ordinate() For Each cell In Columns("A").SpecialCells(xlCellTypeConstants) Name cell.Value As cell.Offset(0, 1).Value Next cell End Sub -- Gary''s Student - gsnu200775 "Confused VB Person" wrote: I have a simple spreadsheet with 2 columns: Column A has original file names for a bunch of Acorbat (.pdf) files while Column B has the new filename. I want to read each row, get the original final name from Column A, rename the old file to the new one whose name I have specified in Column B. Is there a simple VBA that can take care of this? Thanks in advance! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming Files w/Excel
I ran your VBA macro and got this error message: "Run-time error 53: File not
found". My question is how do I explicitly call the file which I read from my spreadsheet? "Confused VB Person" wrote: Thanks for the fast response. But I forgot to mention that I use Excel in Office2003. Will your VBA work with this version? "Gary''s Student" wrote: Perhaps: Sub ordinate() For Each cell In Columns("A").SpecialCells(xlCellTypeConstants) Name cell.Value As cell.Offset(0, 1).Value Next cell End Sub -- Gary''s Student - gsnu200775 "Confused VB Person" wrote: I have a simple spreadsheet with 2 columns: Column A has original file names for a bunch of Acorbat (.pdf) files while Column B has the new filename. I want to read each row, get the original final name from Column A, rename the old file to the new one whose name I have specified in Column B. Is there a simple VBA that can take care of this? Thanks in advance! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming Files w/Excel
In cell A1 enter:
C:\Documents and Settings\Owner\Desktop\helper.xls In cell B1 enter: C:\Documents and Settings\Owner\Desktop\helper2.xls and the rename is performed -- Gary''s Student - gsnu200775 "Confused VB Person" wrote: I ran your VBA macro and got this error message: "Run-time error 53: File not found". My question is how do I explicitly call the file which I read from my spreadsheet? "Confused VB Person" wrote: Thanks for the fast response. But I forgot to mention that I use Excel in Office2003. Will your VBA work with this version? "Gary''s Student" wrote: Perhaps: Sub ordinate() For Each cell In Columns("A").SpecialCells(xlCellTypeConstants) Name cell.Value As cell.Offset(0, 1).Value Next cell End Sub -- Gary''s Student - gsnu200775 "Confused VB Person" wrote: I have a simple spreadsheet with 2 columns: Column A has original file names for a bunch of Acorbat (.pdf) files while Column B has the new filename. I want to read each row, get the original final name from Column A, rename the old file to the new one whose name I have specified in Column B. Is there a simple VBA that can take care of this? Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Renaming a worksheet in excel | Excel Discussion (Misc queries) | |||
Renaming scan files with a list of drawing names in excel spreadsh | Excel Discussion (Misc queries) | |||
Batch renaming of many worksheets in Excel files? | Excel Discussion (Misc queries) | |||
Renaming Files | Excel Discussion (Misc queries) | |||
Excel, renaming columns | Excel Worksheet Functions |