Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message on Opening
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error message on Opening
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 -- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. "Noepie" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error message when opening Excel | Excel Discussion (Misc queries) | |||
Error message opening Excel | Excel Discussion (Misc queries) | |||
Error message on opening?? | Excel Discussion (Misc queries) | |||
error message in opening | Excel Discussion (Misc queries) | |||
Error message when opening file | Excel Programming |