Page 1 of 2 12 LastLast
Results 1 to 20 of 27

Thread: VB6 help needed!

  1. #1

    VB6 help needed!

    Well, I am making a big extension to an older change program of mine. I will now make a menu, with 50 selections, so you can pick which states' tax you want it to calculate!

    Only problem, I dunno how to make tax recognize the menu items with their values.

    I've uploaded it for you guys, if you want to take a look. It's in the 'txtPrice_KeyPress' area, you should see the comment there. Any help would be appreciated!

    mainva | aptigo | JTD out

  2. #2

    VB6 help needed!

    No one knows any VB? Any help at all would be great! [img]i/expressions/face-icon-small-smile.gif[/img]

    mainva | aptigo | JTD out

  3. #3

    VB6 help needed!

    Never learned visual basic while in school. Altough i hear its pretty easy.

  4. #4

    VB6 help needed!

    Originally posted by: Lego
    Never learned visual basic while in school. Altough i hear its pretty easy.
    .................................................. .................................................. .................................................. .............

    mainva | aptigo | JTD out

  5. #5
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    VB6 help needed!

    You'll need to declare each tax value as a Global Constant Variable. If you're studying VB you should know what I'm talking about. If not, post here.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  6. #6

    VB6 help needed!

    I know what your talking about, but you mean that I have to declare 50 global constants? And you mean 'const=x' in the general declarations area?

    mainva | aptigo | JTD out

  7. #7
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    VB6 help needed!

    Yeah, you will have to declare all the variables. Annoying, but it has to be done for the type of program you're talking about. And it would be:

    Const curWhateverState As Currency = 0.23

    or whatever the values are.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  8. #8

    VB6 help needed!

    Oh, well, I guess I have to. Now, about the menu, I have some modules that will allow me to do a Windows-like menu where, if there are too many items, it will shrink and have the arrows at the top and bottom, you know?

    Well, I will try to do it with only like 4 or 5 states, to start. Then I will try that extended menu, or a pop-up menu, and then RAR the project and upload it for you if you want to look at it.

    mainva | aptigo | JTD out

    EDIT: Would I have to put anything new in the code for the calculations? I just tried declaring the four states as Const's, and then ran it, and the tax always comes out to $0.75, even if I use NH tax, which there is none....Hm....

    EDIT 2: I just tried declaring tax = mnuTax, and now the tax comes up as the price in parentheses, such as ($14.98) and then says the amount owed is nothing....o_0

  9. #9

    VB6 help needed!

    Declaring them as global constants doesn't seem to work. However, I may not be declaring tax properly. I tried tax = val(mnutax) and the tax came up as nothing. I tried tax = mnutax and it was the same...I'm not sure what to declare tax as...*sh*rugs

    mainva | aptigo | JTD out

  10. #10
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    RE: VB6 help needed!

    Post a new updated link, and I'll have a look through the code, I should be able to help.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  11. #11

    VB6 help needed!

    Alright, here is an updated ZIP file. It contains the whole project, form files, etc. However, the pop-up menu isn't used at the moment, but I plan to use it. The commands for it at commented out, so use that as you will.

    And thanks for your help! You are the only one that has had anything constructive to say (among the forums I post on).

    mainva | aptigo | JTD out

  12. #12
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    VB6 help needed!

    No problem. [img]i/expressions/face-icon-small-smile.gif[/img]

    Ok, I have to go to work now, I'll have a look when I get back, I'll edit this post when I have something to say.

    Sorry to keep ya waiting, I'll have a look at it now, brb.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  13. #13
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    VB6 help needed!

    Sorry it's taken me ages to reply, but the new zip file isn't working. Fix it up, and I'll take a look.

    EDIT: Disregard, I found the error in the URL and fixed it. Looking now.

    Question: Could you please include the whole project including any modules and the project file (.vbp) in the zip file? The forms by themselves are having trouble in run time without them.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  14. #14

    VB6 help needed!

    Uh, yeah, just change the '.zip' to '.rar' at the end of the URL above. I'm not sure why I uploaded both, but the RAR has the project file and everything.

    mainva | aptigo | JTD out

  15. #15

    VB6 help needed!

    Nothing, CmDr_RavEn? I haven't been playing with any VB recently, but I will try adding a module or something tomorrow. It's gotta be some kind of trick I need to use to get it to work in any way, not just as a menu or a pop-up menu or a big extra form with 50 buttons....There's just gotta be a way to do what I want to do...Unless assembly or C/C++ is the only way to do it...But then, why bother even having VB if those two 'better' languages can do it?

    mainva | aptigo | JTD out

  16. #16
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    RE: VB6 help needed!

    Like I said before, can you please include the whole project including any modules and the project file (.vbp) in the zip file? The forms by themselves are having trouble in run time without them.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  17. #17

    RE: VB6 help needed!

    Ah, I see. Well, you just need to change the URL from before to '.rar' instead of '.zip' But here is the updated link for you. There is only one project file, and then the three forms, one of which isn't being used at the moment, the pop-up menu.

    mainva | aptigo | JTD out

  18. #18

    RE: VB6 help needed!

    Anything yet? I've moved on for now, since I have a final to do, with three programs being CS2B level,and I'm only in CS1B...¬_¬

    But I will be coming back to this later.

    mainva | aptigo | JTD out

  19. #19
    Moderator Raven's Avatar
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Age
    42
    Posts
    2,836

    RE: VB6 help needed!

    Haha really sorry man, it sorta slipped my mind, as I'm finishing my degree as we speak. BUT, my last exam will be in 2 weeks, and after that I'll take a proper look.
    I think I know precisely what I mean
    when I say it's a schpadoinkle day

  20. #20

    RE: VB6 help needed!

    Well, I would help you, I still know VB pretty decently, and java too [img]i/expressions/face-icon-small-happy.gif[/img]
    - I have a good since of using variables in the correct way to calculate whatever you want, so post a free version of file again, the other ones were dead links

Posting Permissions

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