Insrt curr file name & name of active worksheet respectively

O

Olga Cook

I want to be able to save the excel workbook file name with each worksheet
within the workbook per tab name respectively, can this be done?
 
B

Bob Phillips

Sub SaveAsSheets()
Dim oWS As Worksheet

For Each oWS In ActiveWorkbook.Worksheets
oWS.Copy
ActiveWorkbook.SaveAs oWS.Name
Next oWS
End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
O

Olga Cook

easy.got the answer. simply save as usual except add the cell number you are
in, i.e., =cell("filename",a28) will save the tab(s) in the workbook as
respectively named worksheets within the workbook. Thank you Aida for your
help!
 
Top