ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide macro List from Alt+F8 window. (https://www.excelbanter.com/excel-programming/414419-hide-macro-list-alt-f8-window.html)

Shazi

Hide macro List from Alt+F8 window.
 

Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad

Office_Novice

Hide macro List from Alt+F8 window.
 
preceed the MAcro Nmae with Private i.e.

Private Sub YourMacroName()

End Sub

"Shazi" wrote:


Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad


Jim Thomlinson

Hide macro List from Alt+F8 window.
 
A couple of possible ways around this.

1. Add "option private module" at the top of the module. All of the
procedures in the module will now be hidden from the macro list. Note that
this method hides all procedures in the module from the macro list.

2. Change the procedure declaration to provate. Change
Sub MyStuff()
to
Private Sub MyStuff()
Not that using this method means that the scope of the procedure is changed
and it can not be called from outside of the module.

3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.

--
HTH...

Jim Thomlinson


"Shazi" wrote:


Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad


Shazi

Hide macro List from Alt+F8 window.
 
On Jul 22, 6:26*pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
A couple of possible ways around this.

1. Add "option private module" at the top of the module. All of the
procedures in the module will now be hidden from the macro list. Note that
this method hides all procedures in the module from the macro list.

2. Change the procedure declaration to provate. Change
*Sub MyStuff()
*to
*Private Sub MyStuff()
Not that using this method means that the scope of the procedure is changed
and it can not be called from outside of the module.

3. Add an argument to the sub. Change
*Sub MyStuff()
*to
*Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.

--
HTH...

Jim Thomlinson



"Shazi" wrote:

Hi Everyone,


I have one question, How to Hide Macros names from the Macro List.


If you press Alt+F78, *the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.


Regards.


Shahzad- Hide quoted text -


- Show quoted text -


Hi, Mr. Jim,

Thank you very much for providing me this detailed information, which
I dont know before. This is very useful information and its very
necessary for any vba project.

Thank you once again for your support and prompt reply....

Best Regards.

shahzad

Dave Peterson

Hide macro List from Alt+F8 window.
 
Just to add to #3:

Sub Mystuff(Optional DummyParm as variant)

and never pass anything.



Jim Thomlinson wrote:

A couple of possible ways around this.

1. Add "option private module" at the top of the module. All of the
procedures in the module will now be hidden from the macro list. Note that
this method hides all procedures in the module from the macro list.

2. Change the procedure declaration to provate. Change
Sub MyStuff()
to
Private Sub MyStuff()
Not that using this method means that the scope of the procedure is changed
and it can not be called from outside of the module.

3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.

--
HTH...

Jim Thomlinson

"Shazi" wrote:


Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad


--

Dave Peterson

Jim Thomlinson

Hide macro List from Alt+F8 window.
 
MyStuff Shows up in my macro list using the optional parameter. I assume it
does not on your system.
--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

Just to add to #3:

Sub Mystuff(Optional DummyParm as variant)

and never pass anything.



Jim Thomlinson wrote:

A couple of possible ways around this.

1. Add "option private module" at the top of the module. All of the
procedures in the module will now be hidden from the macro list. Note that
this method hides all procedures in the module from the macro list.

2. Change the procedure declaration to provate. Change
Sub MyStuff()
to
Private Sub MyStuff()
Not that using this method means that the scope of the procedure is changed
and it can not be called from outside of the module.

3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.

--
HTH...

Jim Thomlinson

"Shazi" wrote:


Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad


--

Dave Peterson


Ron de Bruin

Hide macro List from Alt+F8 window.
 
Hi Jim

Remove optional

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Jim Thomlinson" wrote in message
...
MyStuff Shows up in my macro list using the optional parameter. I assume it
does not on your system.
--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

Just to add to #3:

Sub Mystuff(Optional DummyParm as variant)

and never pass anything.



Jim Thomlinson wrote:

A couple of possible ways around this.

1. Add "option private module" at the top of the module. All of the
procedures in the module will now be hidden from the macro list. Note that
this method hides all procedures in the module from the macro list.

2. Change the procedure declaration to provate. Change
Sub MyStuff()
to
Private Sub MyStuff()
Not that using this method means that the scope of the procedure is changed
and it can not be called from outside of the module.

3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.

--
HTH...

Jim Thomlinson

"Shazi" wrote:


Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad


--

Dave Peterson



Rick Rothstein \(MVP - VB\)[_2360_]

Hide macro List from Alt+F8 window.
 
3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.


If you declare MyStuff as a function with no arguments, you can still call
it like a subroutine and it won't appear in the Macro listing...

Function MyStuff()
' Do your subroutine type stuff here
End Function

Rick


Dave Peterson

Hide macro List from Alt+F8 window.
 
Nope. I just remembered incorrectly.

Sub testme(Optional parm As Variant = "")

Doesn't show up in my Tools|macro list, though.


Jim Thomlinson wrote:

MyStuff Shows up in my macro list using the optional parameter. I assume it
does not on your system.
--
HTH...

Jim Thomlinson

"Dave Peterson" wrote:

Just to add to #3:

Sub Mystuff(Optional DummyParm as variant)

and never pass anything.



Jim Thomlinson wrote:

A couple of possible ways around this.

1. Add "option private module" at the top of the module. All of the
procedures in the module will now be hidden from the macro list. Note that
this method hides all procedures in the module from the macro list.

2. Change the procedure declaration to provate. Change
Sub MyStuff()
to
Private Sub MyStuff()
Not that using this method means that the scope of the procedure is changed
and it can not be called from outside of the module.

3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any time
the sub is called.

--
HTH...

Jim Thomlinson

"Shazi" wrote:


Hi Everyone,

I have one question, How to Hide Macros names from the Macro List.

If you press Alt+F78, the macro list window appears, users can run
any macro from this list. how to prevent run any macro from the Macro
List.

Regards.

Shahzad


--

Dave Peterson


--

Dave Peterson

Peter T

Hide macro List from Alt+F8 window.
 
"Rick Rothstein (MVP - VB)" wrote in
message ...
3. Add an argument to the sub. Change
Sub MyStuff()
to
Sub Mystuff(byval x as long)
Note that using this method requires you to supply a value for x any

time
the sub is called.


If you declare MyStuff as a function with no arguments, you can still call
it like a subroutine and it won't appear in the Macro listing...

Function MyStuff()
' Do your subroutine type stuff here
End Function

Rick


Ah but then it'd show up in the function list !

Regards,
Peter T




All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com