Excel Open and Close multiple Excel Workbooks In Backround with VBA

Joined
Aug 7, 2008
Messages
5
Reaction score
0
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
 
Last edited:
Joined
Aug 7, 2008
Messages
5
Reaction score
0
What is it supposed to take me to? When I click on the 'here' in the forum write up, it takes me to a Google webpage search. The link that was in an email that was sent to me when you responded still sends me to a broken web link also.
 
Joined
Aug 7, 2008
Messages
5
Reaction score
0
I think so by actually just closing the application itself but that isn't what I was trying to accomplish. I am trying to select a workbook that is only open within the Excel applicaiton in the backround. There is no front end to work with. The purpose is to open up several workbooks, copy template pages out of them, and close them without the user ever seeing the workbooks the templates are pulled from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top