Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Problem with Workbook_Open

Hi,

I want to setup one ComboBox per WorkSheet at startup.
For this I have the following code:
Private Sub Workbook_open()
Worksheets("I_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("I_Calc").ComboBox1.Value = "Gamma"
Worksheets("V_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("V_Calc").ComboBox1.Value = "Gamma"
Worksheets("F_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("F_Calc").ComboBox1.Value = "Gamma"
Worksheets("T_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("T_Calc").ComboBox1.Value = "Gamma"
End Sub

But when I start up the file I get "Permission denied (Error 70)" at line 4.
The setup of the ComboBox1 at WorkSheet(I_Calc) is done correctly by the code.
But for the other WorkSheets it does not work.

What have I done wrong?
I have checked the name of the ComboBoxes and all of them is called ComboBox1.

Br.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Problem with Workbook_Open

Hi Sören,

I could replicate your error if I had set the relevant
ComboBox ListFillRrange property value.



---
Regards,
Norman


"Sören_Marodören" wrote in message
...
Hi,

I want to setup one ComboBox per WorkSheet at startup.
For this I have the following code:
Private Sub Workbook_open()
Worksheets("I_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("I_Calc").ComboBox1.Value = "Gamma"
Worksheets("V_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("V_Calc").ComboBox1.Value = "Gamma"
Worksheets("F_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("F_Calc").ComboBox1.Value = "Gamma"
Worksheets("T_Calc").ComboBox1.List = Array("Alfa", "Beta", "Gamma",
"Delta")
Worksheets("T_Calc").ComboBox1.Value = "Gamma"
End Sub

But when I start up the file I get "Permission denied (Error 70)" at line
4.
The setup of the ComboBox1 at WorkSheet(I_Calc) is done correctly by the
code.
But for the other WorkSheets it does not work.

What have I done wrong?
I have checked the name of the ComboBoxes and all of them is called
ComboBox1.

Br.
/Sören



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Problem with Workbook_Open

Japp, there were already data in the ListFillRange.
When I remove it the Workbook_Open macro works.

Thanks!

Br.
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
Workbook_open - Sub problem ina Excel Programming 14 May 17th 06 08:15 AM
Problem with Workbook_open Vick Excel Discussion (Misc queries) 13 February 14th 06 10:40 PM
Excel 97 Workbook_Open problem cassidyr1[_2_] Excel Programming 1 October 26th 04 02:58 PM
Workbook_Open problem TroyH Excel Programming 4 April 13th 04 11:56 AM
problem with code in workbook_open event Dominique Schroeder Excel Programming 3 April 7th 04 01:56 AM


All times are GMT +1. The time now is 02:48 PM.

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"