View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
lurker111 lurker111 is offline
external usenet poster
 
Posts: 7
Default Using Controls on a Worksheet



"42N83W" wrote:

You may be aware of this, maybe not, but...when placing controls on a
worksheet, the code that handles these controls is placed in the code module
for that worksheet, not a generic code module. In design Mode, place a
control (combobox) on the worksheet, right click on it and choose View Code.
You'll see that you're taken to the code module for that worksheet if you
look over in your Project Explorer window.

I'm thinking that might have something to do with it.

-gk-


Well, I am aware of that and it looks to be done in the same way as a
"Userform" code window. The only thing is, in the standard Worksheet
programming window or a Module programming window I can always reference:

Userform1.PMcombo

Whenever I want to do something to that combobox. I have not tried to do
the "Workbook_open" event from inside that form programming window as I
figured it would have to be done in the worksheet/workbook programming window
(workbook is not available on the pull down menu of the programming window
that actually has the access to the comboboxes and listboxes I made
*embedded* in the worksheet).