RE: sub call with string

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



A sub in the same sheet? Is the sub an event handler or just a regular
macro? If it's just a regular macro I'd move it to a regular module (I don't
think VBA looks for plain-vanilla macros in the sheet modules). If you're
trying to call an event handler, can you move the guts of your second event
handler to a macro in a standard module and replace with a call to the macro
(ie both event handlers would call the same macro).


"aran" wrote:

> Hello thanks
> that seem to work on macros but if i like too run a sub in the same sheet
>
> "JMB" wrote:
>
> > try using
> >
> > Application.Run (MacroName)
> >
> >
> > "aran" wrote:
> >
> > > hello
> > > i have a combobox were i chose a value and like to run a sub
> > > were the name of the value is the name of the sub
> > > how do i do
> > >
> > >
.



Relevant Pages

  • Re: DocumentBeforeClose event not always working
    ... macro call your macro to create the event handler. ... Sub Register_Event_Handler ... The Help files stated that you must create a separate Class Module ...
    (microsoft.public.word.vba.general)
  • RE: sub call with string
    ... Is the sub an event handler or just a regular ... If it's just a regular macro I'd move it to a regular module (I don't ...
    (microsoft.public.excel.programming)
  • Re: Removing Command Button
    ... Sub AAA ... Workbooks("Excel Macro File.xls").Close False ... the Excel window just froze. ... button is created on the Standard toolbar after the macro file is opened. ...
    (microsoft.public.excel.programming)
  • Re: Removing Command Button
    ... will not find it and thus not execute it. ... Private Sub Auto_Open ... Workbooks ("Excel Macro File.xls").Windows.Visible = False ... Private Sub Macro() ...
    (microsoft.public.excel.programming)
  • Re: Removing Command Button
    ... the macro worked perfectly. ... why do we need an additional sub to close ... Dim nCon As CommandBarButton ... MsgBox "auto_close" ...
    (microsoft.public.excel.programming)