+ Reply to Thread
Results 1 to 3 of 3

Edit cells using userform - not working after cell range is changed

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Edit cells using userform - not working after cell range is changed

    With this code, the cell contents can be edited using a userform. Editing is by typing.
    The cell range can be changed while the userform is active and editing is still possible, except for the problem explained:

    When more cells are selected compared to the original selection, editing cannot be done for all cells.
    For example, if 2 cells are originally selected, and then the selection is changed to 3 cells (while the form is still active), then the third cell cannot be modified.
    The procedure is explained in the workbook attached.

    Is there any way to fix this?
    Attached Files Attached Files

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Edit cells using userform - not working after cell range is changed

    You never hook into the events for the new controls. Add this routine to your form:

    Please Login or Register  to view this content.
    then call it from Userform_Initialize and the SelectionChange code:

    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    or you could just call it from FormCreation.
    Rory

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    549

    Re: Edit cells using userform - not working after cell range is changed

    Thanks, I was battling with this one, would never have gotten it.
    The above works as intended.
    Cheers.

+ 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. Replies: 10
    Last Post: 03-08-2018, 03:29 PM
  2. [SOLVED] edit worksheet activate vba to perform also when a cell is changed
    By tlacloche in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-28-2014, 11:00 AM
  3. Replies: 0
    Last Post: 06-04-2012, 07:21 AM
  4. If any cell in range is changed to a certain value/text, fill cells to right with pattern
    By suzanchesson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 09:47 AM
  5. Formula not working when range is changed
    By jjoseph8008 in forum Excel General
    Replies: 2
    Last Post: 05-15-2010, 01:40 PM
  6. Worksheet Change Event-when a cell with a certain range of cells) are changed?
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-25-2005, 07:06 PM

Tags for this Thread

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