Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default i have a file with 50 worksheets, how can I print these names

I have a file that has 50 worksheets, I am trying to print the names of the
worksheets so that I can incorporate into a new file. I made some changes to
the new file and we added about 20 new sheets to the old file so I am looking
for a way to print these names as opposed to writing them all out.

I thank you in advance for your assistance and consideration.

CRF
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default i have a file with 50 worksheets, how can I print these names

try
sub listsheets()
for i=1 to worksheets.count
cells(i,1)=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"chris felix" <chris
wrote in message
...
I have a file that has 50 worksheets, I am trying to print the names of the
worksheets so that I can incorporate into a new file. I made some changes
to
the new file and we added about 20 new sheets to the old file so I am
looking
for a way to print these names as opposed to writing them all out.

I thank you in advance for your assistance and consideration.

CRF


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default i have a file with 50 worksheets, how can I print these names

Hi Chris

You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()


Sub Macro()
Dim ws As Worksheet, lngRow As Long
For Each ws In Worksheets
lngRow = lngRow + 1
Range("A" & lngRow) = ws.Name
Next
End Sub

--
Jacob


"chris felix" wrote:

I have a file that has 50 worksheets, I am trying to print the names of the
worksheets so that I can incorporate into a new file. I made some changes to
the new file and we added about 20 new sheets to the old file so I am looking
for a way to print these names as opposed to writing them all out.

I thank you in advance for your assistance and consideration.

CRF

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
print all worksheets of Excel file to one pdf file Centerfield Excel Discussion (Misc queries) 3 April 30th 09 04:51 AM
How to set worksheets to print in different order in the same file Tamall Excel Worksheet Functions 1 December 3rd 08 10:13 PM
Create command button to print multiple worksheets in a excel file MarcoR Excel Discussion (Misc queries) 3 June 26th 06 07:07 PM
Need to print path & file on ALL excel worksheets... Buzzerd Excel Discussion (Misc queries) 13 January 27th 06 05:32 PM
How do you print all worksheets in a file without opening the fil. timmtamm Excel Worksheet Functions 1 January 4th 05 11:50 AM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"