Results 1 to 7 of 7

Change event problem when the user switches worksheet without pressing ENTER

Threaded View

franklyn Change event problem when the... 09-05-2012, 03:37 PM
TMS Re: Change event problem when... 09-05-2012, 03:54 PM
franklyn Re: Change event problem when... 09-05-2012, 07:00 PM
TMS Re: Change event problem when... 09-05-2012, 07:10 PM
franklyn Re: Change event problem when... 09-05-2012, 07:29 PM
TMS Re: Change event problem when... 09-05-2012, 07:43 PM
franklyn Re: Change event problem when... 09-05-2012, 08:12 PM
  1. #1
    Registered User
    Join Date
    05-20-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2002
    Posts
    12

    Change event problem when the user switches worksheet without pressing ENTER

    I have a workbook which involves the user switching between two worksheets. On Sheet 2 I am using dynamic data validation lists which the user can add to. The default list includes the option "Add new comment". When this is selected, a change event is triggered, [cell].ClearContents. The user then enters the new comment. Pressing enter will trigger another change event which compares the new comment to the default list and if it is missing, add it to the list. This process works.

    The problem I am having is when the user enters a new comment but then switches worksheet without first pressing enter. The change event still triggers but it is ignoring the new comment, and comparing the cell in its ClearContents state with the default list. With some cells it is giving the ClearContents state a value of '0', but with others a value of 'L' and others a value of '-' !!!! The value of '0' ie, blank cell , I understand but the others?? I've tried a worksheet deactivate event, but it doesn't trigger until the change event has finished. I've also thought of a SendKey return but it returns on the new active window.

    CAUSE IDENTIFIED. IF THE USER CHANGES WORKSHEET BEFORE PRESSING ENTER. THE CHANGE EVENT CODE WILL REFERENCE THE CELLS OF THE ACTIVE IE, NEW WORKSHEET.
    Last edited by franklyn; 09-06-2012 at 11:57 AM.

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