Results 1 to 5 of 5

Thread: [RESOLVED] Easy Question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    200

    Resolved [RESOLVED] Easy Question

    I forgot how to do default parameters in VB6. If anyone can help me out I'd be greatful. Basically DFP, PID, RES and SLOT will not always have values so I need to be able to handle for that. Any help is greatly appreciated.

    VB Code:
    1. Private Sub add(PICKSL As String, PROD As Double, PACK As String, _
    2.                 manuid As String, HITIX As String, QTY As Double, _
    3.                 desc As String, DFP As String, PID As String, RES As String, _
    4.                 SLOT As String)

    Nenio foriras ĝis ĝi havas instru ni kiu ni devas scii.

  2. #2
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Easy Question

    Don't you mean Optional?

    Code:
    Private Sub add(PICKSL As String, PROD As Double, PACK As String, _
    manuid As String, HITIX As String, QTY As Double, _
    desc As String, Optional DFP As String, Optional PID As String, Optional RES As String, _
    Optional SLOT As String)

  3. #3
    Hyperactive Member Dmitri K's Avatar
    Join Date
    Sep 2002
    Location
    West Palm Beach, FL
    Posts
    444

    Re: Easy Question

    and as an option you can specify a default value for the missing argument:
    Optional DFP As String = "", Optional PID As String = "missing", etc.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    200

    Re: Easy Question

    Thanks I knew it was easy; just forgot.

    Nenio foriras ĝis ĝi havas instru ni kiu ni devas scii.

  5. #5
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: [RESOLVED] Easy Question

    Don't forget to rate our posts.

    Just letting you know about that feature since you are somewhat new here.

Posting Permissions

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



Click Here to Expand Forum to Full Width