Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Hiding/Protecting the code of macro

Is there a way to Hiding/Protecting the code of macro and
worksheet procedures from the users viewing it. Can it be
made pass-word accessible only.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hiding/Protecting the code of macro

Hi Mario

You can place Private before each sub you want to hide
Private Sub test()

Or add this at the top of the module for all the macro's
Option Private Module

This way you don't see it in the macro list (Alt-F8)


You can Protect your project in the VBA editor

Alt-F11
In the menubar ToolsVBA project properties
See the protection tab

This way they can't see or edit your code


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Mario" wrote in message ...
Is there a way to Hiding/Protecting the code of macro and
worksheet procedures from the users viewing it. Can it be
made pass-word accessible only.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hiding/Protecting the code of macro

When I protect the macro/vba code

tools - VBAProject Properties - select protection tab
select lock project.
enter password

I am not allow to save the spreadsheet
without unprotecting the macro.

any solutions ?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hiding/Protecting the code of macro

Then you do something wrong

Or do you mean that you can't use your own macro to save the workbook?
because you don't see it?



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"George" <gmanassa2lucent.com wrote in message ...
When I protect the macro/vba code

tools - VBAProject Properties - select protection tab
select lock project.
enter password

I am not allow to save the spreadsheet
without unprotecting the macro.

any solutions ?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Hiding/Protecting the code of macro

I protected the macro as stated earl
and saved the spreadsheet

I emailed the spreadsheet to a user
They entered some data into the spreadsheet and
then tried to save the spreadshee

here is the error message they received

You cannot save to this file format when the VBA projec
is protected

You may unprotect the VBA project by choosing in Projecties Comman
on the Visual basic editor's tools menu and entering the password for
the active project

I want to protect the macro, but allow users to change and save the data

George


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hiding/Protecting the code of macro

Hi George

Send(private) me the workbook if you like then I can test it also


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"George" wrote in message ...
I protected the macro as stated early
and saved the spreadsheet.

I emailed the spreadsheet to a user.
They entered some data into the spreadsheet and
then tried to save the spreadsheet

here is the error message they received:

You cannot save to this file format when the VBA project
is protected.

You may unprotect the VBA project by choosing in Projecties Command
on the Visual basic editor's tools menu and entering the password for
the active project.


I want to protect the macro, but allow users to change and save the data.


George



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hiding/Protecting the code of macro

Hi George

You save the file in two formats
Excel 97-2003 and 5.0/95

Save the file as Microsoft Excel workbook, This is the first option
in the SaveAs dialog

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi George

Send(private) me the workbook if you like then I can test it also


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"George" wrote in message ...
I protected the macro as stated early
and saved the spreadsheet.

I emailed the spreadsheet to a user.
They entered some data into the spreadsheet and
then tried to save the spreadsheet

here is the error message they received:

You cannot save to this file format when the VBA project
is protected.

You may unprotect the VBA project by choosing in Projecties Command
on the Visual basic editor's tools menu and entering the password for
the active project.


I want to protect the macro, but allow users to change and save the data.


George





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
How to code Macro for hiding rows Catherine Bond Excel Worksheet Functions 4 June 24th 06 10:13 AM
hiding macro codes upon protecting the worksheet eehj23 Excel Discussion (Misc queries) 1 April 28th 06 03:55 AM
Protecting and Hiding formulas Pav New Users to Excel 3 May 23rd 05 12:25 AM
Hiding/Protecting vb code in excel IanStrange Excel Programming 1 November 10th 03 10:37 AM
protecting macro code John Wilson Excel Programming 0 July 23rd 03 04:06 PM


All times are GMT +1. The time now is 07:29 AM.

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

About Us

"It's about Microsoft Excel"