+ Reply to Thread
Results 1 to 6 of 6

Workbook_Change

  1. #1
    Forum Contributor
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    103

    Workbook_Change

    I'm having trouble getting this to work. I open Sheet1 and put in the following code:

    Please Login or Register  to view this content.
    When cell an12 is clicked, Data Validation gives a list of options which the user can then select from T, S, M, L, or H. When I change this to Sub Something() and run Something()... it works fine. I have other code that runs with Worksheet_Change in other documents that also runs fine. So, I assume I coded something wrong in how it's identified by Excel. Any help much appreciated.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Workbook_Change

    Hello Taemex,

    You could try it as per the attached WorkBook.

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Workbook_Change

    On your worksheet, it's working exactly as it should, however once again on my workbook, I can only make it work by manually Running your ProtectSheet() sub. For clarity, yes, I did copy the Sheet1 code. Also, I already have Worksheet_Change code other than this. Maybe this is the issue? Here is my current Worksheet_Change code with your code integrated:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Workbook_Change

    Hello Taemex,

    Thank you for the feedback.

    Please try your Code like this:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Workbook_Change

    That was it! And I thank you very much for your help - I will mark as resolved and +1 your rep right after posting this. Quick question though, why did putting that code at the top change the way the code ran? The only thing I can think of is because of the "On Error", if that somehow made a loop with Nevermind that I was unaware of.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Workbook_Change

    Hello Taemex,

    The only thing I can think of is because of the "On Error"...
    Yes, you are correct!

    Thank you for the good Rep.

    Happy Coding.

+ 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: 1
    Last Post: 03-16-2009, 08:57 AM
  2. combobox and workbook_change event
    By leonidas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2006, 11:51 AM
  3. Event: Workbook_Change or Worksheet_Change
    By Han in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-15-2006, 07:10 PM
  4. workbook_change
    By kizzie in forum Excel General
    Replies: 3
    Last Post: 08-11-2005, 01:05 PM
  5. private workbook_change and Goal seek
    By helmekki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2005, 10:35 AM

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