+ Reply to Thread
Results 1 to 7 of 7

Java'ish Return?

Hybrid View

  1. #1
    Maull
    Guest

    Java'ish Return?

    And now this is my 3rd post in this forums since I registered a few hours ago.

    HOW IS VB / EXCEL SO HARD! *cry*

    Pseudoishcode

    Sub My_Sub()
         Call Return_Percent(5, 10)
         RETURN IS PASTED INTO CELL A1 ON SHEET 1
    End Sub
    
    Sub Return_Percent(X, Y)
         X*Y=Z
         Return Z
    Sub End
    Second Sub has been asked in another thread so that's not so important

    What I am after is a generic method/sub that can take a a few simple variable's and return something that can be pasted into a cell.

    What I am trying to do is build my own API that can be used by idiots, (EG Managers)
    Last edited by Maull; 12-06-2010 at 07:14 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Java'ish Return?

    Hi Maull

    If you only joined the Forum a few hours ago, you're off to a bad start.

    Some of us "Idiots" actually belong to and participate in this Forum.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Maull
    Guest

    Re: Java'ish Return?

    Hello Jaslake,

    I am very sorry if I offended you, that was positively not my intent.

    I simply said the thing about my manager because when I emailed him a Zip folder he tried to open it in Notepad.

    Nuff said?

    My boss is a not very tec savy, hence the need for me to build him a simple API that he can customise (I am moving onto another contract soon)

    If my 1st post indicated that the ppl reading this were idiots I wouldn't have posted here, I'm after the experts! (Thoe I don't think it did offend anyone (I am hoping that you simply didn't read my post correctly) Do NOT want to make a bad impression in my 1st day!)

    I would ask, out of of a debilitating need to be liked that someone post that Im not an ***?
    Last edited by Maull; 12-06-2010 at 08:05 PM.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Java'ish Return?

    Hi Maull

    I don't prejudge. Don't know your Boss, don't know you. I've 69 years of "life experience". That experience has taught me to keep my disparaging thoughts in my head. I seldom express them and if I ever do, I'd NEVER put them in writing. Look at WikiLeaks for a perfect example of the issues that WILL crop up.

    Your post didn't offend me as I've got pretty thick skin. However, I don't think I
    simply didn't read my post correctly
    Your post is what it is. Were I you, I'd amend the post and eliminate the disparaging comments. Your Boss may well see them which could well not be good for your career.

    I have no clue how others on the Forum will react; my reaction is that I'll probably pass.

    John

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Java'ish Return?

    In Excel VBA, a user-defined function (UDF) generally returns a single value to the cell in which the formula that invokes it appears.
    Function MySimpleSum(dAddend1 As Double, dAddend2 As Double) As Double
        MySimpleSum = dAddend1 + dAddend2
    End Function
    E.g., =MySum(A1, B1)

    Subs that modify cells in other ways need to be invoked from a button, or an event, or other code.

    I don't disagree with any of John's comments.
    Last edited by shg; 12-06-2010 at 08:36 PM.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Java'ish Return?

    @ jaslake

    With only a few less life years than you, I tend to agree with you, but my problem is this, why do arrogant numbskulls ask us geriatric idiots for advice?

    Why on earth don't they take the time to learn use simple languages Like DIESEL or even VI editor rather than this new Java'ish.

    Oh for the tolerance and diplomacy of shg

    My apologies to all I might, or indeed may already have offended.

    More beer?........burppp....

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Java'ish Return?

    Hi Marcol

    I guess because it's one of life's learning experiences "Too Old Soon, Too Late Smart". We all go through it...some embrace it...some don't. shg obviously has. I admire his work and his thoughtful responses.

    As for us " geriatric idiots", as long as we're contributing, allow us to do so. When we're not, tell us.

    I'll have a beer with you tonight.

    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1