ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Insrt curr file name & name of active worksheet respectively (https://www.excelbanter.com/excel-worksheet-functions/75757-insrt-curr-file-name-name-active-worksheet-respectively.html)

Olga Cook

Insrt curr file name & name of active worksheet respectively
 
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?

Bob Phillips

Insrt curr file name & name of active worksheet respectively
 
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)

"Olga Cook" <Olga wrote in message
...
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?




Olga Cook

Insrt curr file name & name of active worksheet respectively
 
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!

"Olga Cook" wrote:

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?



All times are GMT +1. The time now is 11:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com