Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Why dosen't vb like me why !! [lil help]

  • 11-04-2006 02:20PM
    #1
    Registered Users, Registered Users 2 Posts: 221 ✭✭


    ok heres my function call :

    Find_Number(current_row, current_col, current_num, sdk)

    and heres the def of said function (sdk is a 3d array of ints)

    Public Function Find_Number(ByRef row, col, num, sdk)

    it keeps telling me a need an '=' why oh why !!

    any help is great thanks guys

    - Elfman


Comments

  • Closed Accounts Posts: 884 ✭✭✭NutJob


    post the code and ill see what i can do. not einugh info there


    are u using option explicit???


  • Closed Accounts Posts: 3,357 ✭✭✭Beano


    you have declared it as a function so VB expects it to return a value. To use the function as a sub call it like this

    Call Find_Number(current_row, current_col, current_num, sdk)

    or

    Find_Number current_row, current_col, current_num, sdk

    both are functionally equivalent.


  • Registered Users, Registered Users 2 Posts: 221 ✭✭Elfman


    Thanks il try that now


  • Closed Accounts Posts: 51 ✭✭david powell


    as you have declared it as a function it wants to return a value, declare it as a "Sub" (subroutine ) if you don't wanta to return a value..

    As it's declared as a function you need to do one of the following:-

    ret_val = Find_Number(current_row, current_col, current_num, sdk)

    or if you want to ignore the value returned from the function:-
    call Find_Number(current_row, current_col, current_num, sdk)


    from memory either of them should work...


Advertisement