Results 1 to 6 of 6

Thread: Not require return values

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    9

    Not require return values

    If I have a function that returns a value I don't care about, how can I make VB6 not complain about not catching that answer? I have done it before, so I know it is possible, but I forget how. Right now when I click off the line, it turns red and an error comes up "Compiler Error: Expected ="

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Not require return values

    How about making it a procedure rather than a function?

  3. #3
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: Not require return values

    Does it still give you the error if you use the

    Call SomeFunction

    syntax..?
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

  4. #4
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Not require return values

    You could also:

    Bogus = function(...) and just ignore Bogus

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Not require return values

    I'm assuming you probably included the () when calling it. Remove those, and simply call it like a normal sub. It'll be fine.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    9

    Re: Not require return values

    Thanks techgnome, fixed me right up.

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