0

As the title says, my aim was to Open another workbook when opening one, which works perfectly fine.

Imagine now that the second workbook has to be opened for calculations on the first one, but I don't want to see the second one at all.

I accomplished that task with the following code:

Private Sub Workbook_Open()

Workbooks.Open "E:\excelweeks\cw 38.xls"
On Error Resume Next
ActiveWorkbook.Windows("cw 38.xls").Visible = False

End Sub

It's pretty simple, but gives me

Runtime error "9"

when running it, which I kind of understand but 1. it works nonetheless 2. can't seem to fix it, so I decided to just ignore the error, but I'm still curious.

Glad for any answer :)

Teamothy
  • 2,000
  • 3
  • 16
  • 26
Hoesl
  • 13
  • 6

0 Answers0