Sure, you can add to your existing code. What is it you want to do/add?On 2002-03-08 08:34, Von Pookie wrote:
I currently have a blank workbook with nothing but the code, so that when I open it, it will run the macro and open certain sheets.
Can I add on to this so that after it is finished running, it will close the original worksheet? [img]/board/images/smiles/icon_confused.gif[/img]
This is what I currently have:
Thankee much.Code:Private Sub Workbook_Open() On Error GoTo myErr ChDir "directory" Workbooks.Open "workbook1.xls" Workbooks.Open "workbook2.xls" Which = Application.GetOpenFilename(MultiSelect:=True) 'Which now contains an array of file names which you can enumerate through For I = 1 To UBound(Which) Workbooks.Open Which(I) Next End myErr: End Sub
Like this thread? Share it with others