Results 1 to 5 of 5

Thread: permut and combin functions

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2005
    Posts
    1,069

    permut and combin functions

    Hello

    I was trying to use the permut and combin functions (which are available in excel) in vba, but i keep on getting the error

    "Compile error:

    Sub or Function not defined" when using the functions in vba.

    is there a library that i need to import in order to get permut and combin to work?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: permut and combin functions

    I just opened up an new Excel workbook, put =PERMUT(A2,A3) in cell D1, popped some numbers in A2 and A3 and it worked just fine for me.

    What version of Excel are you using?

  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: permut and combin functions

    Hack :
    Hes using VBA to call the functions in Excel.

    vb_s:
    How are you trying to use them atm?

    Edit:
    Code:
    ?application.Evaluate("permut(5,2)")
     20
    (using the immediates window)
    Last edited by Ecniv; Jun 30th, 2006 at 06:31 AM.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  4. #4
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: permut and combin functions

    Can you post the code you are using to call the functions?
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2005
    Posts
    1,069

    Re: permut and combin functions

    thanks for the replies guys

    i did

    myvalue = permut(5,2)

    and it gave the error

    "Compile error:

    Sub or Function not defined" when using the functions in vba.

    hey ecniv, what is the
    application.Evaluate command in your code?

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