Results 1 to 8 of 8

application.onkey depending on a if function.

Threaded View

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    Curacao
    MS-Off Ver
    Excel 2003
    Posts
    18

    application.onkey depending on a if function.

    Dear excel friends,

    My challenge is to find out the following:

    Sub exam.()
    if Sheets("Sheet1").protect=true Then
    application.OnKey "{DELETE}","key"
    end if
    end sub
    and

    Sub key()
    ActiveSheet.Unprotect ("password")
    end sub
    does the "application OnKey" works as well depending on an if function? In case the sheet is unprotected, the delete button should be used to clear the cell contents.

    Hope you can help me out.

    kind regards,
    Last edited by TravelDrome; 09-03-2012 at 02:10 PM.

Thread Information

Users Browsing this Thread

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

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