View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
Brian Thompson via OfficeKB.com
 
Posts: n/a
Default Save file with cell name

Hi
I am not sure, hope this explains
Workbook saved as Yard Summary
52 shhets in workbook, one for each week
Weekly i update one sheet and copy sheet, then paste special to new sheet ,
format, and "save as "new sheet as per the tab name
Incidentaly, I do have the cell A1 in each sheet =Cell("filename",A1) giving
the tab name in the sheet
Q. Is macro for the "save as" section possible?

regards



Dave Peterson wrote:
with activesheet
.parent.saveas filename:="C:\" & .name & ".xls", ...rest of options
end with

The dots in front of .parent and .name refer to the object in the previous with
statement. In this case, they refer to the active sheet.

So this says to use the activesheet and save the parent (the workbook that
contains that activesheet) to the C:\ folder as the name of that active sheet
(.name still refers to the activesheet).

If you tried this and got your file saved as "NAME", then I'd bet you didn't
copy|paste correctly (or changed somet stuff after).

The formula:
=cell("Filename",a1)
returns the name of the worksheet that holds the formula.

But that name can be obtained directly from the worksheet name itself.

Hi Dave
Sorry not understand

[quoted text clipped - 19 lines]

regards



--
Message posted via http://www.officekb.com