Dim objExcel As New Excel.Application Dim exWb As Excel.Workbook Dim bookTitle As String Dim bookAutor As String Dim myBooks As Collection Set myBooks = New Collection Set exWb = objExcel.Workbooks.Open("G:\MyFolder\BookShelf.xlsx") Set excelWorkBook = objExcel.Workbooks.Open("G:\Dr Ahmad\Handover\QuickWord.xlsx") ' I need code in this region which could run some kind of Loop on excelWorkBook and give me a collection of book objects ' creating a book from all the records in Sheet1 of excelWorkBook such that the value in column 1 of each row will be the title of ' the book and the value in column 2 of each row will be the author of the book. exWb.Close Set exWb = Nothing
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.