Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message when opening Excel Constance Excel Discussion (Misc queries) 2 January 31st 07 02:44 PM
Error message opening Excel Ed Excel Discussion (Misc queries) 1 March 18th 05 04:04 AM
Error message on opening?? JDT Excel Discussion (Misc queries) 1 March 4th 05 11:41 PM
error message in opening David Excel Discussion (Misc queries) 1 January 13th 05 09:14 PM
Error message when opening file Chrissy Excel Programming 1 December 22nd 04 05:51 PM


All times are GMT +1. The time now is 03:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"