View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_8_] Nigel[_8_] is offline
external usenet poster
 
Posts: 172
Default Rename File from list

Try something like the following....

' somewhere to build the file name string
Dim MyFileName As String
MyFileName = "C:\" & Trim(Range("A1").Value) & ".xls"


ActiveWorkbook.SaveAs Filename:=MyFileName, FileFormat:=xlNormal

Cheers
Nigel

"Cesar Zapata" wrote in message
...
Hello,

I'm trying to make a kind like batch renamer in excel any ideas will be
appreaciated.

What i'm trying to do is to rename the "Active Workbook" with the
current name + value of a cell from a list.

for example lets say in cell A1 to a5 I have

NY
CT
MI
NV
TX

so I need to create 5 workbooks ... like

Sales NY.xls
Sales CT.xls
Sales MI.xls
Sales NV.xls
Sales TX.xls

the macro will be part of an addin. Thanks


TIA

CZ