+ Reply to Thread
Results 1 to 2 of 2

Inability to have 2 x Private Sub Worksheet_Change causing problems...

  1. #1
    Registered User
    Join Date
    11-25-2014
    Location
    Lincoln, UK
    MS-Off Ver
    2010
    Posts
    19

    Exclamation Inability to have 2 x Private Sub Worksheet_Change causing problems...

    Hi all,

    I have just found a code that fixes a problem I had with users pasting data which ruined the existing format. The code now ensures the paste is 'undone' and 'redone' as paste special. Great

    However, this seemingly interferes with my existing coding for inserting rows (as I integrated the above into the existing Private Sub Worksheet_Change). Now when I run it, both codes do what they should, but when processing the first code an error box appears - '"Method 'List' of object '_CommandBarComboBox' failed"

    Any ideas to allow both codes to work separately?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Inability to have 2 x Private Sub Worksheet_Change causing problems...

    I would make sure that the pasting check is performed first, since any code execution that changes a cell will clear the undo stack. Try it this way:


    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

+ 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. Private Sub Worksheet_Change problem
    By Delorean14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2013, 02:25 AM
  2. [SOLVED] Private sub worksheet_change not working
    By DavidBW in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2013, 06:06 PM
  3. Worksheet_Change Event Causing Loop
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2009, 10:20 AM
  4. Private Sub Worksheet_Change
    By VicM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2008, 01:28 AM
  5. Private Sub Worksheet_Change:do i need to turn them into one?
    By alex1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2007, 06:43 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