Consulting

Page 1 of 2 1 2 LastLast
Results 1 to 20 of 23

Thread: Sleeper: IsUDF Function

  1. #1
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location

    Sleeper: IsUDF Function

    Okay, so I remember seeing somewhere this function made by a couple of MS MVP's that tested whether or not a function was a UDF or native function. I thought it was on the Newsgroups, but I can't find it.

    Does anybody have this UDF or know where I can find it again?! I'd love to use it again..

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I remember this Zack. The main thread was trying to get the procedure handle using the AddressOf operator, which would identify a function within the active project. Nice idea, and I managed to get it to work for him in Excel 97 using the Getz/Kaplan AddressOf emulator, but not a later version.

    A simple version can be built by looping through each code module, checcking each proc in that module, and if the same name and a Function, return True.

    .
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by xld
    A simple version can be built by looping through each code module, checcking each proc in that module, and if the same name and a Function, return True.
    To make this reliable, though, wouldn't you have to loop through all open workbooks and installed addins?

    Problem is, if the UDF resides in an addin with a protected project, you're SOL as it will just error out on you... unless I'm mistaken.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Well judging by your answers I must have fully missed the boat on understanding this question....
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  6. #6
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by MOS MASTER
    Well judging by your answers I must have fully missed the boat on understanding this question....
    No, not at all! I was simply querying Bob's approach. I haven't actually tried Justin's KB entry, but it's sold as one tool to do the job. (Actually, Zack should be a little embarassed for not looking in the KB first! )

    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by kpuls
    No, not at all! I was simply querying Bob's approach. I haven't actually tried Justin's KB entry, but it's sold as one tool to do the job. (Actually, Zack should be a little embarassed for not looking in the KB first! )
    That KB article approach is pretty flawed. It builds an array of built-in functions, which means that it has to be kept up-to-date, a function such as Split in Excel 97 would report as Native when it would be a UDF, it reports my used Excel names as native functions, it only looks at the first function in a formula, thereby potentially missing the embedded UDF, and it even returns =A1 as a native function. Not one that I think I will add to my library.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hey Bob,

    Those are fair points that you raise, and definately concerns that should be thought about if using Justin's approach. Providing you're using it in the version he authored the entry in (2000?), then they're shouldn't be too much of an issue with it though. (IMHO anyway.)

    Now, any chance on getting you to submit your suggested method to the KB? I still think that it has a potential issue with the protected project scenario, but that's just a caveat on the discussion really. (Again, unless I'm wrong here, and would be happy to be proved as such!)
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  9. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by kpuls
    Those are fair points that you raise, and definately concerns that should be thought about if using Justin's approach. Providing you're using it in the version he authored the entry in (2000?), then they're shouldn't be too much of an issue with it though. (IMHO anyway.)
    I was using 2000 when I ran it.

    Quote Originally Posted by kpuls
    Now, any chance on getting you to submit your suggested method to the KB? I still think that it has a potential issue with the protected project scenario, but that's just a caveat on the discussion really. (Again, unless I'm wrong here, and would be happy to be proved as such!)
    Okay Ken, I'll cut that and we'll see what we get. Even when there are issues, it still is a valid KB item as we are talking techniques here. I assume you mean the simple iterative process not the Addresof soluition (never did finish that one)
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  10. #10
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hey Bob,

    You bet. The simple one. We'll wait for the second till you finish it!
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  11. #11
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    Quote Originally Posted by xld
    I was using 2000 when I ran it.



    Okay Ken, I'll cut that and we'll see what we get. Even when there are issues, it still is a valid KB item as we are talking techniques here. I assume you mean the simple iterative process not the Addresof soluition (never did finish that one)
    I'd be more interested in the Addressof solution (Not for Xl97 where you would need to use the work around)
    Kind Regards,
    Ivan F Moala From the City of Sails

  12. #12
    VBAX Mentor Justinlabenne's Avatar
    Joined
    Jul 2004
    Location
    Clyde, Ohio
    Posts
    408
    Location
    I would definitely like to see a better version of the kb I submitted, or at least any ways to make it better, or a method completely different.

    I had help on it's design, and it was discussed that it would need updates, etc.. when more functions are added so it does have some serious limits, but was the only justifiable working solution I could come up with at the time

    Can't wait for Bob's....
    Justin Labenne

  13. #13
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by Ivan F Moala
    I'd be more interested in the Addressof solution
    Be interested in both, actually. The more in the KB the merrier!
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  14. #14
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by kpuls
    No, not at all! I was simply querying Bob's approach. I haven't actually tried Justin's KB entry, but it's sold as one tool to do the job. (Actually, Zack should be a little embarassed for not looking in the KB first! )

    Hmmzz A..Ok..I thought I was loosing it reading Bob's detour and your reply to it.

    O well..then I'm partially Mad!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  15. #15
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Hmm, couple of points to make here...

    1) Didn't look at the KB, my fault. I'll take my licks Ken.

    2) Can't wait for Bob's solution.

    3) Moose - you can't be mad!!

    4) Miss a couple of days, miss a whole page of replies!!

  16. #16
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by firefytr
    3) Moose - you can't be mad!!

    4) Miss a couple of days, miss a whole page of replies!!
    3).....?...are you sure...been feeling like I am lately...

    4) Yes..you've been ignoring us...while we've been so helpfull to you!
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  17. #17
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by MOS MASTER
    3).....?...are you sure...been feeling like I am lately...
    I'll vouch for you being mad, buddy!



    Quote Originally Posted by MOS MASTER
    4) Yes..you've been ignoring us...while we've been so helpfull to you!
    Shame on you again, Zack! Here you were out listening to Ted Nugget and ignoring your hard working friends!
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  18. #18
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Yes, I admit it, I went and saw Ted "McNugget" Nugent. And I did it whilst everyone was here at VBAX, diligently working their Tushy's off. I have been a very bad person. Moose, do you think Babydum can help me? I think I need help; they say admittance is the first step..

    Quote Originally Posted by Ivan F Moala
    ..I'd be more interested in the Addressof solution ..
    I, too, would be interested in such a solution.

  19. #19
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by firefytr
    Yes, I admit it, I went and saw Ted "McNugget" Nugent. And I did it whilst everyone was here at VBAX, diligently working their Tushy's off. I have been a very bad person. Moose, do you think Babydum can help me? I think I need help; they say admittance is the first step..
    Yes I think Babydum can help you for sure!

    He's helping me git rid of the Moose in me...

    And you know things always get worse before improvements arise! (So yes, I keep on hoping)

    Please post a question to Doctor B in the Off topic forum.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  20. #20
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by MOS MASTER
    Yes I think Babydum can help you for sure!

    He's helping me git rid of the Moose in me...
    But... but... we love the Moose!
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

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