Excel Macro: Create XLS from Cell

April 14, 2009 at 15:18:28
Specs: Windows Vista
Hello, I'am trying to create files from a table.
All I'm able to do so far is create files by manually selecting the cell I want. How can I have it create them from an entire range of cells?

This is the code I'm using:

Public Sub SaveAsA1()
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

See More: Excel Macro: Create XLS from Cell

Report •

April 15, 2009 at 06:09:11
Public Sub SaveAsA1()
  For Each c In ActiveSheet.Range("A1:A20")
    ActiveWorkbook.SaveAs Filename:=c.Value
  Next 'c
End Sub

Report •
Related Solutions

Ask Question