ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide Macros from Users using workbook! (https://www.excelbanter.com/excel-programming/298437-hide-macros-users-using-workbook.html)

Bob Phillips[_6_]

Hide Macros from Users using workbook!
 
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz






Don Guillett[_4_]

Hide Macros from Users using workbook!
 
Put this line at the TOP of the module and they won't be seen. You can also
protect the project so an unsophisticated user cannot get to them to change.

Option Private Module
--
Don Guillett
SalesAid Software

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz






Rob H[_4_]

Hide Macros from Users using workbook!
 
Hi Gr8Guy

You may use the code at the page address

http://www.cpearson.com/excel/hidden.htm

I think it may help im not sure....

The bad thing might be that after a certain amount of time the macro will be
visible again or something then the users WILL see it. I dont quite
understand how it works because I havent read all of it but have a good back
up plan because some end users are very clever. If its to protect them
against deletion or alteration then it might be better just to password
protect it.

Rob

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz






david mcritchie

Hide Macros from Users using workbook!
 
And so that you can tell what you actually have
Subroutine and Function Table for Open Workbooks (#ListFunctionsAndSubs)
http://www.mvps.org/dmcritchie/excel...nctionsAndSubs
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm


"Don Guillett" wrote in message ...
Put this line at the TOP of the module and they won't be seen. You can also
protect the project so an unsophisticated user cannot get to them to change.

Option Private Module




Tim Zych[_8_]

Hide Macros from Users using workbook!
 
Bob, why do you recommend adding a parameter simply to hide the macros from
view? Is that something you would really implement?


"Bob Phillips" wrote in message
...
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible

in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz










Bob Phillips[_6_]

Hide Macros from Users using workbook!
 
Tim,

It is not something I do often, but I have done it. I offered three methods,
all have drawbacks.

The first is to make it Private. This may not be possible if called from
another module.

The second is to make it a function. This is both my least and my most
favourite approach. I tend to write more functions than subs, returning a
result, so my most favourite. But it will appear in the function wizard, so
also my least favourite.

The third, by adding a parameter, than can be a do-nothing parameter, means
that it does not appear in the macros, does not appear in function wizard,
and does not affect the running. Making it optional means that no code needs
to change. So a sub like

Public Sub TestSub(Optional dummy as Boolean)
....
End Sub

and just ignore dummy .

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tim Zych" wrote in message
...
Bob, why do you recommend adding a parameter simply to hide the macros

from
view? Is that something you would really implement?


"Bob Phillips" wrote in message
...
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible

in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz












Patrick Molloy[_4_]

Hide Macros from Users using workbook!
 
also at the top of the module put
OPTION MODULE PRIVATE
Now procedures that are Public can be used by other modules, but don't
appear in the macro list

--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"Bob Phillips" wrote in message
...
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz








Don Guillett[_4_]

Hide Macros from Users using workbook!
 
Patrick probably meant to say
Option Private Module

--
Don Guillett
SalesAid Software

"Patrick Molloy" wrote in message
...
also at the top of the module put
OPTION MODULE PRIVATE
Now procedures that are Public can be used by other modules, but don't
appear in the macro list

--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"Bob Phillips" wrote in message
...
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible

in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz










Tim Zych[_8_]

Hide Macros from Users using workbook!
 
I like Option Private Module. It's my current favorite.

"Bob Phillips" wrote in message
...
Tim,

It is not something I do often, but I have done it. I offered three

methods,
all have drawbacks.

The first is to make it Private. This may not be possible if called from
another module.

The second is to make it a function. This is both my least and my most
favourite approach. I tend to write more functions than subs, returning a
result, so my most favourite. But it will appear in the function wizard,

so
also my least favourite.

The third, by adding a parameter, than can be a do-nothing parameter,

means
that it does not appear in the macros, does not appear in function

wizard,
and does not affect the running. Making it optional means that no code

needs
to change. So a sub like

Public Sub TestSub(Optional dummy as Boolean)
...
End Sub

and just ignore dummy .

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tim Zych" wrote in message
...
Bob, why do you recommend adding a parameter simply to hide the macros

from
view? Is that something you would really implement?


"Bob Phillips" wrote in message
...
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not

visible
in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz














gr8guy

Hide Macros from Users using workbook!
 
Hi,

Is it possible to hide macros from a user so that they are not visible in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz




gr8guy

Hide Macros from Users using workbook!
 
thanks bob,

will try your suggestion!

Bob, could you also help me regarding my earlier posting :
"hyperlinks-changing the filename only!"

Thanks & best regards,

Eijaz



"Bob Phillips" wrote in message ...
Either

make them Private
make them Functions (they will be visible from the function wizard)
make them public but pass a parameter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz







gr8guy

Hide Macros from Users using workbook!
 
Thanks all of you for the wonderful suggestions, I'll try them out & let you
know!

Rgds,

Eijaz


"Rob H" wrote in message
...
Hi Gr8Guy

You may use the code at the page address

http://www.cpearson.com/excel/hidden.htm

I think it may help im not sure....

The bad thing might be that after a certain amount of time the macro will

be
visible again or something then the users WILL see it. I dont quite
understand how it works because I havent read all of it but have a good

back
up plan because some end users are very clever. If its to protect them
against deletion or alteration then it might be better just to password
protect it.

Rob

"gr8guy" wrote in message
...
Hi,

Is it possible to hide macros from a user so that they are not visible

in
Tools Macro Macros & so that user may not run them by mistake?


Rgds,

Eijaz









All times are GMT +1. The time now is 11:57 PM.

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