Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim bFirst as Boolean
Dim i as long, wkbk as workbook bFirst = True for i = 0 to me.lstWorksheets.ListCount - 1 if me.lstworksheets.Selected(i) then if bFirst then worksheets(me.lstWorksheets.List(i)).copy set wkbk = Activeworkbook bFirst = False else worksheets(me.lstWorksheets.List(i)).copy _ After:=wkbk.Worksheets(wkbk.Worksheets.count) end if Next -- Regards, Tom Ogilvy "Eileen" wrote in message ... I have a workbook with several sheets. A user form lists the sheet names in a multi select list, lstWorksheets. When the user clicks OK, I want to copy all selected sheets to one new workbook. Can someone please help me with the code to accomplish this? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vb code to copy and list selected row to diff sheets | Excel Discussion (Misc queries) | |||
copy sheets selected on user form | Excel Programming | |||
Sending user selected daa from cmblistbx to sheets of destination | Excel Programming | |||
Copy from User form to Sheet macro | Excel Programming | |||
Copy one spreadsheet into another without activating second spreadsheet's user form | Excel Programming |