+ Reply to Thread
Results 1 to 4 of 4

"Exception Occured" Message

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    "Exception Occured" Message

    A Userform I am building was working as expected till I added two spinner controls.
    These are each linked to a TextBox on the form and to a cell on a worksheet using the initialise and the change procedures for the controls.
    They work the first time the form is displayed but thereafter if they are clicked (or if any other control on the form is clicked), a window pops up with the message "An Exception Occurred".
    There is no indication of where that exception is. The window is not the ordinary coding error window.
    It will be a big job for me to disentangle the relevant bits of userform and code to forward to enable anybody to fully solve the problem so what I am hoping can happen first is that someone will be able to suggest what may be going wrong. I am at a loss because I have never seen that window before.
    John

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,002

    Re: "Exception Occured" Message

    In the absence of a sample workbook, or even the code that causes the problem, it is difficult to offer a solution.

    However, I would suggest that you include a Stop at the beginning of each code module associated with the controls. When the control (Textbox, whatever) is changed, the code will halt at the Stop statement and you can use F8 to step through the code until the error message is displayed. In that way, you can check what state the variables are in, and so on.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: "Exception Occured" Message

    Thanks for your suggestion which I will follow.
    I have disabled all the code connected with the spinners and the associated text boxes and still the message appears. I have removed the controls altogether and the message disappears.
    I will now add each part back one at a time and use the stop command and see what I can find out.
    John

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,002

    Re: "Exception Occured" Message

    Can you post a sample workbook?

+ 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: 7
    Last Post: 09-16-2014, 04:12 PM
  2. Update Macro to search column Bfor "Fail" and "Exception"
    By programct in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2014, 02:32 PM
  3. MS Excel w/ userform & macros - Receive "Automation error Exception ocurred" message
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2014, 01:54 AM
  4. [SOLVED] AN exception has occured error
    By djsouljah in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 03:27 PM
  5. MSoffice Outlook 2003 message to be saved in C dir with the file name "From" "Sent" "Sub"
    By shailendra0509 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2012, 01:32 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