Error message on Opening

N

Noepie

Hello,

I get an error message on opening a workbook when the sheet "Invoer" is not
active. If it is then the error message doesn't occur. The code is as follows:
__________
Private Sub Workbook_Open()
With Application
Sheets("Portefeuille").Range("Data").ClearContents
Sheets("Invoer").Range("e3").Select
End With
End Sub
___________
Does anyone know what goes wrong.

Regards,

Noepie
 
B

Barb Reinhardt

If you're selecting a range on a sheet, that sheet needs to be active first.
Try adding this in the appropriate location.

Sheets("Invoer").Select
 

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