View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bing Bing is offline
external usenet poster
 
Posts: 48
Default Possible to assign macro defined as private to a form control.

Hi again.

Let me first say that i appreciate everyone who has been kind enough to
respond to my inquiries/questions due to my "ignorance" of VBA/excel.

Another question is this: I have created a form control on a worksheet and
also defined the macro(public sub subName) in the same worksheet module and
subsequently assigned that public macro to the control. However, i don't
want users to be able to select this macro within Excel (via
Tools-Macro-Macros).

If i declare the macro as private (private sub subnam) that prevents user's
from choosing the macro. BUT that also prevents me from assigning the macro
to the form control as well since i used Right-Click on Form Control-Assign
Macro method!

So how can i assign a macro to a control without also letting the user gain
access to the macro via Tools-Macro-Macros?