+ Reply to Thread
Results 1 to 3 of 3

Protection and Macro

  1. #1
    Registered User
    Join Date
    11-03-2010
    Location
    Brussels, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    5

    Protection and Macro

    Hello,
    I have created a userform that pops up when the user double clik on a cell of a sheet.
    It works but at the end of the macro, the cursor edits the cell where I doubleclicked and I have to type Esc no to change what it is written on it. As there will be other users using this workbook I would like to avoid the risk of changing what it is written on the cell.
    What can I do in order no to select the cell once I exit the macro?

    (Ideally I would also like to protect that cell where I doubleclick but if I do it the macro doesn't work.)

    Here the code on the spreadsheet:
    Please Login or Register  to view this content.
    The code on the userform CountrymoreLoc:

    Please Login or Register  to view this content.
    Thank you very much for helping.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Protection and Macro

    Quote Originally Posted by Ritzo View Post
    Hello,
    I have created a userform that pops up when the user double clik on a cell of a sheet.
    It works but at the end of the macro, the cursor edits the cell where I doubleclicked and I have to type Esc no to change what it is written on it...
    What can I do in order no to select the cell once I exit the macro?
    You will note in the header of the DoubleClick Event that you have a Cancel Boolean, so on that basis:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Protection and Macro

    Sideline:

    use
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    Last edited by snb; 12-06-2010 at 07:41 AM.



+ Reply to Thread

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