Using a module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason Charalambides

    Using a module

    This may sound very basic. I have built a very long procedure with way too
    many Ifs etc. I wonder if it is possible to transfer at least some of the
    contents to modules so in case an if condition is satisfied the procedure to
    be followed will be in a module. As an example, let me say that I have an
    If condition stating:

    If Hypo_length>35 Then
    Do a bunch of stuff
    End if

    Can I have all that "bunch of stuff" in a module that I name "Module9"?

    If this is a possibility, what is the command for activating the "Module9"?

    Thanks in advance for your help

    J.Charalambides .


    P.S. Please do not send replies directly to me cause I removed my actual
    address due to too much spam that I receive lately. A response in the group
    will be greatly appreciated.


  • Roy Riddex

    #2
    Re: Using a module

    > This may sound very basic. I have built a very long procedure with way
    too[color=blue]
    > many Ifs etc. I wonder if it is possible to transfer at least some of the
    > contents to modules so in case an if condition is satisfied the procedure[/color]
    to[color=blue]
    > be followed will be in a module. As an example, let me say that I have an
    > If condition stating:
    >
    > If Hypo_length>35 Then
    > Do a bunch of stuff
    > End if
    >
    > Can I have all that "bunch of stuff" in a module that I name "Module9"?
    >
    > If this is a possibility, what is the command for activating the[/color]
    "Module9"?[color=blue]
    >
    > Thanks in advance for your help
    >
    > J.Charalambides .
    >[/color]

    Select Project, then Add Module.
    you can then say something like
    VariableName = Module1.OtherVa riable
    I assume you'll be passing parameters, this is done in the same way as
    passing parameters to a normal procedure.


    Comment

    • Larry Serflaten

      #3
      Re: Using a module

      "Jason Charalambides" <nospam@protect ionplan.com> wrote[color=blue]
      > This may sound very basic. I have built a very long procedure with way too
      > many Ifs etc. I wonder if it is possible to transfer at least some of the
      > contents to modules so in case an if condition is satisfied the procedure to
      > be followed will be in a module. As an example, let me say that I have an
      > If condition stating:
      >
      > If Hypo_length>35 Then
      > Do a bunch of stuff
      > End if
      >
      > Can I have all that "bunch of stuff" in a module that I name "Module9"?[/color]

      Yes, but that would be overkill. That If/Then code is in a procedure, either
      a Sub, Function, or an event. To break it up simply add a new procedure
      (Sub or Function) in the same module you are currently using. That way you
      keep all the code that works together, in the same module.

      LFS




      -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
      http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
      -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

      Comment

      Working...