+ Reply to Thread
Results 1 to 23 of 23

How to make error handle for mis-typed variable?

Hybrid View

  1. #1
    Dave Peterson
    Guest

    Re: How to make error handle for mis-typed variable?

    Don't you get the same error if you run it from the workbook that owns the code?

    Maybe you could change the original procedure to pass it the parameters that it
    needs???

    RB Smissaert wrote:
    >
    > Have the following situation:
    > An .xla file will import a Sub from a text file and then run it like this:
    >
    > Dim strSub as String
    >
    > 'some code here to get the Sub imported
    > Application.Run strSub
    >
    > Now it is possible that in this imported Sub are variables that are not
    > defined publicly, so there
    > will be a compile error, variable not defined.
    > As this is not a runtime error I am not sure this error can be handled
    > gracefully, but I would be interested
    > in any suggestions how this could be done.
    >
    > RBS


    --

    Dave Peterson

  2. #2
    RB Smissaert
    Guest

    Re: How to make error handle for mis-typed variable?

    I do run it from the workbook that owns the code.
    The code is imported in the VBE from a text file.

    RBS


    "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
    news:42717DED.3CB2D147@netscapeXSPAM.com...
    > Don't you get the same error if you run it from the workbook that owns the
    > code?
    >
    > Maybe you could change the original procedure to pass it the parameters
    > that it
    > needs???
    >
    > RB Smissaert wrote:
    >>
    >> Have the following situation:
    >> An .xla file will import a Sub from a text file and then run it like
    >> this:
    >>
    >> Dim strSub as String
    >>
    >> 'some code here to get the Sub imported
    >> Application.Run strSub
    >>
    >> Now it is possible that in this imported Sub are variables that are not
    >> defined publicly, so there
    >> will be a compile error, variable not defined.
    >> As this is not a runtime error I am not sure this error can be handled
    >> gracefully, but I would be interested
    >> in any suggestions how this could be done.
    >>
    >> RBS

    >
    > --
    >
    > Dave Peterson



+ 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