View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default ActiveX ComboBox Linked Cell

kittronald formulated the question :
Garry,

After inserting a module with the code, the VBE opens and selects "With
ComboBox1" with the error below:

Compile error:

Invalid outside procedure

The combobox is named ComboBox1.



- Ronald K.


Well, the code should go behind the class that contains the combobox.
This would be a userform or a worksheet. Otherwise, if you want to ref
the combobox in a standard module then you need to prepend its parent
object.

Examples:

With UserForm1.ComboBox1...
or
With Sheets("sheetname"[or index]).ComboBox1...


If the code resides in the combobox's parent class:

With Me.ComboBox1...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc