+ Reply to Thread
Results 1 to 9 of 9

i dont see what the problem is...

  1. #1
    Jason
    Guest

    i dont see what the problem is...

    i have a program which was written in Basic, long time back. now i am trying
    to write the same program in vba, i am using the same formulas used and
    everything is the same, except the user interface and things. but i am struck
    on one formula which doesnt give me the result it should.

    C = 18.4686 - 3827.77 / DRY - 218140! / DRY ^ 2 (old, basic formula)
    C = 18.4686 - (3827.77 / DRY) - (218140! / DRY ^ 2) (formula i use in vba)

    this is the formula used in basic, but when i test it in vba, i get a
    different result compared to what i get in the basic program. i tried to
    calculate it using excel, but i still get a different result. i really cannot
    see why, because the formula is the same and why is there a difference
    between basic version, and vba version ??
    can anybody please help..



  2. #2
    Don Guillett
    Guest

    Re: i dont see what the problem is...

    Since some of us might not speak basic, perhaps you could tell us what you
    want to do.

    what is the ! for
    wha is DRY

    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    "Jason" <Jason@discussions.microsoft.com> wrote in message
    news:D374D163-C528-4A81-AC75-A075FE0D6089@microsoft.com...
    >i have a program which was written in Basic, long time back. now i am
    >trying
    > to write the same program in vba, i am using the same formulas used and
    > everything is the same, except the user interface and things. but i am
    > struck
    > on one formula which doesnt give me the result it should.
    >
    > C = 18.4686 - 3827.77 / DRY - 218140! / DRY ^ 2 (old, basic formula)
    > C = 18.4686 - (3827.77 / DRY) - (218140! / DRY ^ 2) (formula i use in vba)
    >
    > this is the formula used in basic, but when i test it in vba, i get a
    > different result compared to what i get in the basic program. i tried to
    > calculate it using excel, but i still get a different result. i really
    > cannot
    > see why, because the formula is the same and why is there a difference
    > between basic version, and vba version ??
    > can anybody please help..
    >
    >




  3. #3
    Charlie
    Guest

    RE: i dont see what the problem is...

    So what results did you get in each case? (Need the value of "DRY").

    P.S. The parentheses in the second formula are redundant, i.e. they can be
    removed.

    "Jason" wrote:

    > i have a program which was written in Basic, long time back. now i am trying
    > to write the same program in vba, i am using the same formulas used and
    > everything is the same, except the user interface and things. but i am struck
    > on one formula which doesnt give me the result it should.
    >
    > C = 18.4686 - 3827.77 / DRY - 218140! / DRY ^ 2 (old, basic formula)
    > C = 18.4686 - (3827.77 / DRY) - (218140! / DRY ^ 2) (formula i use in vba)
    >
    > this is the formula used in basic, but when i test it in vba, i get a
    > different result compared to what i get in the basic program. i tried to
    > calculate it using excel, but i still get a different result. i really cannot
    > see why, because the formula is the same and why is there a difference
    > between basic version, and vba version ??
    > can anybody please help..
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: i dont see what the problem is...

    Try this

    18.4686 - (3827.77 / DRY) - (218140! / Application.Power(DRY, 2))

    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "Jason" <Jason@discussions.microsoft.com> wrote in message
    news:D374D163-C528-4A81-AC75-A075FE0D6089@microsoft.com...
    > i have a program which was written in Basic, long time back. now i am

    trying
    > to write the same program in vba, i am using the same formulas used and
    > everything is the same, except the user interface and things. but i am

    struck
    > on one formula which doesnt give me the result it should.
    >
    > C = 18.4686 - 3827.77 / DRY - 218140! / DRY ^ 2 (old, basic formula)
    > C = 18.4686 - (3827.77 / DRY) - (218140! / DRY ^ 2) (formula i use in vba)
    >
    > this is the formula used in basic, but when i test it in vba, i get a
    > different result compared to what i get in the basic program. i tried to
    > calculate it using excel, but i still get a different result. i really

    cannot
    > see why, because the formula is the same and why is there a difference
    > between basic version, and vba version ??
    > can anybody please help..
    >
    >




  5. #5
    Jason
    Guest

    Re: i dont see what the problem is...

    Thanks for your replies

    DRY could be any value, in this instance its 69. i worked out the answer by
    using a calculator, excel and in vba, but the same formula run through BASIC
    doesnt give me the same result.

    but, i think the problem is with the old program because, i wrote another
    basic program with the same formula, same value for DRY and my reults match..







  6. #6
    Jason
    Guest

    Re: i dont see what the problem is...

    Thanks for your replies

    DRY could be any value, in this instance its 69. i worked out the answer by
    using a calculator, excel and in vba, but the same formula run through BASIC
    doesnt give me the same result.

    but, i think the problem is with the old program because, i wrote another
    basic program with the same formula, same value for DRY and my reults match..







  7. #7
    Charlie
    Guest

    Re: i dont see what the problem is...

    We think so too

    "Jason" wrote:

    > Thanks for your replies
    >
    > DRY could be any value, in this instance its 69. i worked out the answer by
    > using a calculator, excel and in vba, but the same formula run through BASIC
    > doesnt give me the same result.
    >
    > but, i think the problem is with the old program because, i wrote another
    > basic program with the same formula, same value for DRY and my reults match..
    >
    >
    >
    >
    >
    >


  8. #8
    Jason
    Guest

    Re: i dont see what the problem is...

    anyway, atleast i know where to come again if i have problems,

    thanks guys

  9. #9
    Don Guillett
    Guest

    Re: i dont see what the problem is...

    As I said, it would be nice to tell us what you wanted to do

    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    "Jason" <Jason@discussions.microsoft.com> wrote in message
    news:B42B8F4D-492B-4F84-8B03-BFD4FF8CD980@microsoft.com...
    > anyway, atleast i know where to come again if i have problems,
    >
    > thanks guys




+ 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