View Single Post
  #8   Report Post  
anilsolipuram
 
Posts: n/a
Default


Explanation to my previous post

temp = temp & W.Name & Chr(10) (1)
'code
'code

Workbooks.Add (2)
temp1 = Split(temp, Chr(10)) (3)
Range("a1").Select (4)
For i = 0 To UBound(temp1) (5)
Selection.Value = temp1(i) (6)
ActiveCell.Offset(1, 0).Select (7)
Next
Application.DisplayAlerts = False (8)

ActiveWorkbook.SaveAs Filename:= _
"C:\worksheet_name.txt", _
FileFormat:=xlText, CreateBackup:=False (9)
ActiveWorkbook.Save
ActiveWorkbook.Close(10)
Application.DisplayAlerts =false (11)
Workbooks.OpenText Filename:="C:\worksheet_name.txt" (12)

(1) temp variable stores all the worksheet names with chr(10) , new
line charecter between sheet names
(2) add new workbook
(3)split the temp variable to get individual sheet names
(4) select a1 cell in new workbook
(5)(6)(7) loop through all the worksheet variables and put the variable
in column a of new workbook
(8) disable alerts
(9) save the new workbook created as text file in c:\
(10)(11) save and close the new workbook
(12) open the text file in excel.
(1)


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=381213