Computing.Net > Forums > Programming > Excel Macro: Create XLS from Cell

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel Macro: Create XLS from Cell

Reply to Message Icon

Name: edevoe1
Date: April 14, 2009 at 15:18:28 Pacific
OS: Windows Vista
Subcategory: Batch
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: April 15, 2009 at 06:09:11 Pacific
Reply:

Untested:

Public Sub SaveAsA1()
  For Each c In ActiveSheet.Range("A1:A20")
    ActiveWorkbook.SaveAs Filename:=c.Value
  Next 'c
End Sub


0
Reply to Message Icon

Related Posts

See More


Find and Delete Folders u... [C++] Smtp Console To Dae...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Excel Macro: Create XLS from Cell

Can I call an Excel macro from cell www.computing.net/answers/programming/can-i-call-an-excel-macro-from-cell/4812.html

Excel Macro www.computing.net/answers/programming/excel-macro/14702.html

Excel Macro www.computing.net/answers/programming/excel-macro/14822.html