Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Restricting Macros

I have a program that uses VBA modules and macros. I've password protected
the VBA. How do I restrict the running of the macros from the Tools, Macros
menu? Edit and Delete are restricted but not Run. Thank you.
--
Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Restricting Macros


"Ed" wrote in message
...
I have a program that uses VBA modules and macros. I've password

protected
the VBA. How do I restrict the running of the macros from the Tools,

Macros
menu? Edit and Delete are restricted but not Run. Thank you.
--
Ed


Have you tried the Application.Caller method? It should tell you how the
macro was called. I guess it should be possible to figure out whether it was
was called from the Tools|Macros menu item.

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Restricting Macros

Add this to the module at the start

Option Private Module

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ed" wrote in message
...
I have a program that uses VBA modules and macros. I've password

protected
the VBA. How do I restrict the running of the macros from the Tools,

Macros
menu? Edit and Delete are restricted but not Run. Thank you.
--
Ed



  #4   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Restricting Macros

This fixed the problem; thank you.

"Bob Phillips" wrote:

Add this to the module at the start

Option Private Module

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ed" wrote in message
...
I have a program that uses VBA modules and macros. I've password

protected
the VBA. How do I restrict the running of the macros from the Tools,

Macros
menu? Edit and Delete are restricted but not Run. Thank you.
--
Ed




  #5   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Restricting Macros

I needed to use Option Private Module. But your reply introduced another
method to me; thank you.

"Fredrik Wahlgren" wrote:


"Ed" wrote in message
...
I have a program that uses VBA modules and macros. I've password

protected
the VBA. How do I restrict the running of the macros from the Tools,

Macros
menu? Edit and Delete are restricted but not Run. Thank you.
--
Ed


Have you tried the Application.Caller method? It should tell you how the
macro was called. I guess it should be possible to figure out whether it was
was called from the Tools|Macros menu item.

/Fredrik



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
Restricting entry scubas Excel Worksheet Functions 1 January 11th 10 02:34 PM
restricting use of certain characters Rob Excel Discussion (Misc queries) 4 June 8th 06 01:07 AM
Restricting Rows Old Music Lover Excel Discussion (Misc queries) 1 July 23rd 05 02:27 AM
Restricting VBA macros halem2[_25_] Excel Programming 1 September 17th 04 02:35 PM
Restricting cells Noctos[_13_] Excel Programming 5 January 3rd 04 05:09 PM


All times are GMT +1. The time now is 12:58 PM.

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"