+ Reply to Thread
Results 1 to 6 of 6

Trapping error in add-in

  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    new delhi
    MS-Off Ver
    Excel 2003
    Posts
    45

    Exclamation Trapping error in add-in

    Hi all,

    I have created an add-in with multiple module and intended to use as password protected file.

    Since there are multiple modules and there are multiple opportunity of errors. Is there is any way I can trap errors by declaring any thing as global or using class programming which can help to generate error message and exit the procedure in case any error arise during any execution.

    Thanks,
    Govind

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Trapping error in add-in

    What sort of errors are you expecting?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-01-2009
    Location
    new delhi
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Trapping error in add-in

    Hi,

    I am expecting run time errors such as type mismatch, user do not enter correct values. code error due to transition from workbook to add in..

    Most recently i have seen error in this part of code of adding hyperlink.
    (still trying to figure out sol)
    ActiveCell.Hyperlinks.Add Anchor:=mycell, Address:= _
    "XXXXXXX", TextToDisplay:=original

    I am looking for a solution where user get a generic error message such as "unable to process" etc. when any such error occurs.

    Thanks,
    Govind

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Trapping error in add-in

    I would think it much more effective to make sure answers are validated so that type mismatch errors are avoided.

  5. #5
    Registered User
    Join Date
    04-01-2009
    Location
    new delhi
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Trapping error in add-in

    Thats for sure!!
    I have tried to use that as much possible (with my limited knowledge of VBA).

    Some of the errors such as I mentioned above are occuring in the utility.where code is working fine in the worbook..but do not work when i use it as add-in..
    see the above example of hyperlink. It is working fine when i use in original workbook. but it gives error when i use in add-in.


    govind

  6. #6
    Registered User
    Join Date
    04-01-2009
    Location
    new delhi
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Trapping error in add-in

    above error was occuring because the worksheets were shared and that caused the error...


    Govind

+ 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