Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TUNGANA KURMA RAJU
 
Posts: n/a
Default Macro for part of W/book sheets

I am looking for a macro that gives sheet names of w/book next to current
sheet.
Suppose I place this macro in sheet 6 ,from sheet 7 to end of W/book sheet
names be listed in this sheet 6 from range A2:A100.Any body Pl. try and post
me.
  #2   Report Post  
Posted to microsoft.public.excel.misc
davesexcel
 
Posts: n/a
Default Macro for part of W/book sheets


Sub wsnames()
Set r = Sheets(1).Range("a1")
For i = 1 To Sheets.Count
r.Cells(i, 1) = Sheets(i).Name
Next i
End Sub

Because this code names all the sheets;
You can alter the code to Sheet(6), and add;
Range("A1:A6").Select
Selection.ClearContents
after Next i


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=520043

  #3   Report Post  
Posted to microsoft.public.excel.misc
TUNGANA KURMA RAJU
 
Posts: n/a
Default Macro for part of W/book sheets

THANKS.very good idea.In last line I have added (instead of clearcontents)
selection.Delete Shift:= xlUp.

"davesexcel" wrote:


Sub wsnames()
Set r = Sheets(1).Range("a1")
For i = 1 To Sheets.Count
r.Cells(i, 1) = Sheets(i).Name
Next i
End Sub

Because this code names all the sheets;
You can alter the code to Sheet(6), and add;
Range("A1:A6").Select
Selection.ClearContents
after Next i


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=520043


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
Possible Macro Timing Overrun generates Excel Exception [email protected] Excel Discussion (Misc queries) 2 February 23rd 06 04:10 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM
Macro to link Sheets to main workbook raven_guy Excel Discussion (Misc queries) 0 June 24th 05 12:36 PM
Macro for moving sheets minhao Excel Discussion (Misc queries) 3 December 10th 04 08:09 AM


All times are GMT +1. The time now is 04:29 PM.

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"