hi
your code process all the sheets listed in list box, check if
List22.Selected (x)  = true then selected value & do the process

Private Sub CommandButton1_Click()
Dim Lst As String
Dim x As Long
    For x = 0 To ListBox1.ListCount - 1
        If ListBox1.Selected(x) = True Then
            Lst = ListBox1.List(x)
            Select Case Worksheets(Lst).Visible


            Case Is = xlSheetVisible
                Worksheets(Lst).Cells.Copy
                Workbooks.Add
                Selection.PasteSpecial Paste:=xlValues
                Selection.PasteSpecial Paste:=xlFormats
            End Select
        End If
    Next
        Unload Me


End Sub


regards
Bala

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to