I want to add all the worsheets of selected workbook to a listbox.but without opening a workbook.
i have done it in the following way
but here excel opens that workbook.still thios is ok.Code:Set Wkb = Workbooks.Open(fileName:=mypath) For Each ws In Wkb.Worksheets SheetList.Add ws.name & ".xls" Next n = SheetList.Count For i = 1 To n UserControl.List1.AddItem SheetList(i) Next i
but when a wbook having password is opened it asks mw for password.I dont want that.
I want to send a sheet directly without opening it.
Also i am saying activesheet.copy -- if i am not opening a workbook how will i copy a worksheet which i have selected from the listbox.




Reply With Quote