+ Reply to Thread
Results 1 to 4 of 4

Run Time error due to event change code when I delete columns in file

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Run Time error due to event change code when I delete columns in file

    Hi,

    I am enclosing a file to show my issue.

    I have event-change vba code in the first sheet. When i go to the first sheet and select say columns A through I and then delete them i get a run time error due to the event-change code.

    Any ideas why? and How to prevent this? Or what should i do?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: Run Time error due to event change code when I delete columns in file

    You are not getting this error because of deleting, but because of simply changing anything in your sheet, if your sheet is empty that is. This happens because It will see "A1" as the only used cell, making it column 1. So when you try to move 2 columns to the left with this
    Please Login or Register  to view this content.
    you will get the message you are getting. To avoid it, you could use the following change in your code:

    Please Login or Register  to view this content.
    .?*??)
    `?.???.?*??)?.?*?)
    (?.?? (?.?
    Pichingualas <---
    ??????????????????????????

    Wrap your code with CODE TAGS.
    Thank those who helped you, Don't forget to add to their REPUTATION!!! (click on the star below their post).
    Please mark your threads as [SOLVED] when they are (Thread Tools->Mark thread as Solved).

  3. #3
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: Run Time error due to event change code when I delete columns in file

    That should work, but tell me if you keep having trouble.

  4. #4
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: Run Time error due to event change code when I delete columns in file

    That fixed it .....thanks!!!!!!!!!

+ 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