+ Reply to Thread
Results 1 to 4 of 4

Preventing Macro key use

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Preventing Macro key use

    I have a button that performs a macro to clear cells on a sheet. I am wondering if it is possible to put rules on the use of the button so it can't be pressed once by accident and erase everything

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Preventing Macro key use

    maybe something like
    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Preventing Macro key use

    Another idea is to remove the button. You can run a macro using the ALT-F8 macro list.

    Even better is if you macro doesn't appear in that list, you can still run the macro by typing its hidden name in the RUN box in the ALT-F8 macro list window. So only you know the real name of the hidden macro and can thus run it.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Preventing Macro key use

    Where would I put this? Within the macro itself?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Preventing a macro from removing formulas
    By jasont1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2013, 08:22 AM
  2. [SOLVED] Preventing macro from running if
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2013, 12:23 PM
  3. Too many calculations preventing Private Sub from executing macro
    By tx12345 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2006, 04:43 PM
  4. Preventing macro from .xlt from executing in a .xls
    By XxLicherxX in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2005, 02:35 PM
  5. [SOLVED] Preventing Macro Flash
    By PCakes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2005, 06:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1