I'm trying to open a workbook that is in the background.
Dim app As New Excel.Application
app.Visible = False
Dim book As Excel.Workbook
Set book = app.Workbooks.Add(UserForm1.TextBox1.Text)
I get the filename out of a textbox.
I get a crash at:
Sheets("Start").select
I guess the workbook in the background is not the active one. How can I activate it?
My idea was:
Workbooks(UserForm1.TextBox1.Text).Activate
But I only have the filename, not the whole path and filename.