Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a sub routine that can be called 2 ways. Manually from a combo box or called from another sub routine. Part of the code involves an input box password checker.

    I only want the input box password checker to activate if the sub is called manually, but be bypassed if it is called from another sub routine.

    Would this be possible?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You could add a True/False argument:

    Code:
    Sub MySubRoutine(CheckPassword As Boolean)
      ...
      If CheckPassword Then
    	... ' your password check code goes here
      End If
      ...
    End Sub
    Call it like this from the combo box:

    Call MySubRoutine(True)

    and like this from the other subroutine:

    Call MySubRoutine(False)

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •