I have two workbooks open, one I am copying from and the other copying to. Workbook from could have multiple worksheets. I would like to load the worksheets into a user form in workbook to.
The first form I asked for the name of the workbook from which to copy. After the user fills in the name of the book, I trap for vb err.number 9 'subscript out of range' which I think means that the workbook is not open.
If the book is open it is at that point that I would like to load the worksheets names into a combo box on form 2. What I have so far is
which gives an subscript out of range error also. Am familiar with VB but my familiarity with Excel is limited.
Any help is appreciated.
Kim
The first form I asked for the name of the workbook from which to copy. After the user fills in the name of the book, I trap for vb err.number 9 'subscript out of range' which I think means that the workbook is not open.
If the book is open it is at that point that I would like to load the worksheets names into a combo box on form 2. What I have so far is
Code:
frm2.cboWorksheet.AddItem Sheets(frm1.txtWorkBook.Text)
Any help is appreciated.
Kim