Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

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

Options
  • 11-04-2006 2:20pm
    #1
    Registered Users 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 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