assign cell content as file name

  I am attempting to create a macro that will save a workbook with the
file name under which I save the workbook coming from the contents of
one of the cells in the workbook. Suppose that each time the workbook
was altered, a specific cell (A1 on Sheet1 for instance) contained the
desired file name for that workbook.  It is my goal to create a macro
that automatically assigns said workbook a name based on the content of
that cell.  Any help would be most appreciated.

0
10/18/2005 3:24:55 PM
excel 39879 articles. 2 followers. Follow

1 Replies
475 Views

Similar Articles

[PageSpeed] 20

Something like???

dim myFileName as string
myfilename = "C:\temp\" & thisworkbook.worksheets("sheet1").range("a1").value
thisworkbook.saveas filename:=myfilename


You may want to look at .SaveCopyAs in VBA's help, too.


paul.sternhagen@gmail.com wrote:
> 
>   I am attempting to create a macro that will save a workbook with the
> file name under which I save the workbook coming from the contents of
> one of the cells in the workbook. Suppose that each time the workbook
> was altered, a specific cell (A1 on Sheet1 for instance) contained the
> desired file name for that workbook.  It is my goal to create a macro
> that automatically assigns said workbook a name based on the content of
> that cell.  Any help would be most appreciated.

-- 

Dave Peterson
0
petersod (12005)
10/18/2005 4:12:13 PM
Reply:

Similar Artilces: