I am trying to open and close serveral Excel workbooks in the backround to be able to copy sheets selected by the user into a current workbook the user is in. Here is the code I use to open the workbooks:
Set ExceltabAP = New Excel.Application
For i = 1 To SeriesCount
SeriesName = ActiveCell.Value
If SeriesName <> "" Then
Set ExceltabWB = ExceltabAP.Workbooks.Open(CSht_DESeedFilePath & SeriesName & ".xls")
ActiveCell.Offset(1, 0).Select
Else
Exit Sub
End If
Next i
This will open 12 workbooks to be used to populate a multipage form and from there the user picks the sheets they want to copy to their current workbook. I need the code to close the 12 workbooks that I opened in the backround when the user is done.
Please help!
Thanks in advance.
Clint
Set ExceltabAP = New Excel.Application
For i = 1 To SeriesCount
SeriesName = ActiveCell.Value
If SeriesName <> "" Then
Set ExceltabWB = ExceltabAP.Workbooks.Open(CSht_DESeedFilePath & SeriesName & ".xls")
ActiveCell.Offset(1, 0).Select
Else
Exit Sub
End If
Next i
This will open 12 workbooks to be used to populate a multipage form and from there the user picks the sheets they want to copy to their current workbook. I need the code to close the 12 workbooks that I opened in the backround when the user is done.
Please help!
Thanks in advance.
Clint
Last edited: