Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 140
Default Locking the macro view function

Hi all,

I have a survey spreadsheet which has some macros in it.
When i send the spreadsheet out, i want to prevent others from seeing the
macro code.
Is there a way i can lock this down as protecting the workbook etc does not
offer this as an option and the macro can still be viewed.
I tried removing the whole toolbar, but anyone with excel knowledge can just
put that back.
Can anyone help????

Many Thanks
Matt

--
Matt Lynn

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200909/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Locking the macro view function

Open the VBE (Alt+F11). In the Project Explorer window (usually top left. If
it's not visible, go to View, and make it visible) right click any of the
parts of your workbook's coding, and select properties. You should now be
able to go to the protection tab, and setup a password.

The other nice thing about this is while sheet/workbook protection can be
cracked in 2-3 minutes by a macro, VB protection is stronger and requires a
larger amount of effor to defeat.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Mattlynn via OfficeKB.com" wrote:

Hi all,

I have a survey spreadsheet which has some macros in it.
When i send the spreadsheet out, i want to prevent others from seeing the
macro code.
Is there a way i can lock this down as protecting the workbook etc does not
offer this as an option and the macro can still be viewed.
I tried removing the whole toolbar, but anyone with excel knowledge can just
put that back.
Can anyone help????

Many Thanks
Matt

--
Matt Lynn

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200909/1


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 140
Default Locking the macro view function

Hi Luke
So, i did that. I right clikced on Module 1 where the nacro is, and set up a
p/w in the protection tab and also selected "lock project for viewing". When
i return to the spreadsheet i can still access the macro through
"tools/macro/macros".

Did i do something wrong?

thanks luke
Regards
Matt

Luke M wrote:
Open the VBE (Alt+F11). In the Project Explorer window (usually top left. If
it's not visible, go to View, and make it visible) right click any of the
parts of your workbook's coding, and select properties. You should now be
able to go to the protection tab, and setup a password.

The other nice thing about this is while sheet/workbook protection can be
cracked in 2-3 minutes by a macro, VB protection is stronger and requires a
larger amount of effor to defeat.
Hi all,

[quoted text clipped - 9 lines]
Many Thanks
Matt


--
Matt Lynn

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200909/1

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Locking the macro view function

To clarify:
Did you want to prevent people from seeing the code, or prevent them from
calling the macros?

The explaination I first gave was to hide/protect the code. If you don't
want users to be able to call the macros directly, place the word "Private"
in front of you subs, like so:

Private Sub MySub ()
'do something
End Sub

However, it might (depdning on your setup) be possible for a user to start
recording a macro in another workbook, and then activate the macros
(somehow?) in your book. That would tell them the name of the macro called,
but again, if you did what I said earlier, they can't edit/see the actual
coding.

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Mattlynn via OfficeKB.com" wrote:

Hi Luke
So, i did that. I right clikced on Module 1 where the nacro is, and set up a
p/w in the protection tab and also selected "lock project for viewing". When
i return to the spreadsheet i can still access the macro through
"tools/macro/macros".

Did i do something wrong?

thanks luke
Regards
Matt

Luke M wrote:
Open the VBE (Alt+F11). In the Project Explorer window (usually top left. If
it's not visible, go to View, and make it visible) right click any of the
parts of your workbook's coding, and select properties. You should now be
able to go to the protection tab, and setup a password.

The other nice thing about this is while sheet/workbook protection can be
cracked in 2-3 minutes by a macro, VB protection is stronger and requires a
larger amount of effor to defeat.
Hi all,

[quoted text clipped - 9 lines]
Many Thanks
Matt


--
Matt Lynn

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200909/1


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 140
Default Locking the macro view function

All sorted - add the p/w to the VBE as you suggested, then lock the
spreadsheet in the noormal way, the save and close and reopen - hey presto.

Thanks luke - you're a star
Regards
Matt



Mattlynn wrote:
Hi Luke
So, i did that. I right clikced on Module 1 where the nacro is, and set up a
p/w in the protection tab and also selected "lock project for viewing". When
i return to the spreadsheet i can still access the macro through
"tools/macro/macros".

Did i do something wrong?

thanks luke
Regards
Matt

Open the VBE (Alt+F11). In the Project Explorer window (usually top left. If
it's not visible, go to View, and make it visible) right click any of the

[quoted text clipped - 9 lines]
Many Thanks
Matt



--
Matt Lynn

Message posted via http://www.officekb.com



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 140
Default Locking the macro view function

Hi Luke - your original suggestion was perfect. I didnt realise for it to
kick in i had to save and close the workbook and the reopen. When i did this,
it worked. The idea was to prevent them from seeing it, and your suggestion
did just that.

Thanks very much Luke
Regards
Matt


Luke M wrote:
To clarify:
Did you want to prevent people from seeing the code, or prevent them from
calling the macros?

The explaination I first gave was to hide/protect the code. If you don't
want users to be able to call the macros directly, place the word "Private"
in front of you subs, like so:

Private Sub MySub ()
'do something
End Sub

However, it might (depdning on your setup) be possible for a user to start
recording a macro in another workbook, and then activate the macros
(somehow?) in your book. That would tell them the name of the macro called,
but again, if you did what I said earlier, they can't edit/see the actual
coding.

Hi Luke
So, i did that. I right clikced on Module 1 where the nacro is, and set up a

[quoted text clipped - 21 lines]
Many Thanks
Matt


--
Matt Lynn

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200909/1

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking cells but keeping Grouping Function available Cheriti Excel Worksheet Functions 1 September 22nd 08 10:44 PM
how to view a macro Holly Excel Discussion (Misc queries) 3 January 30th 07 06:11 PM
Locking debug mode in a macro Megadrone Excel Worksheet Functions 1 November 30th 06 10:32 PM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
How to view tiled Excel worksheets by locking rows for scrolling . Ralph S Bryant Excel Worksheet Functions 1 November 23rd 04 06:21 PM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"