Solved

VBasic 6.0 help

Posted on 2000-05-06
4
162 Views
Last Modified: 2010-05-02
ok i only have 90 pts left so what i need now is how to get my tax and total price to print in my picture box
btw...my State code will be going in the txtState textbox

here is what i have

Private Function tax() As Single
Dim sTax As Single

If txtState <> "MS" Then
     sTax = 0
Else
    If txtState = MS Then
       sTax = Price * 0.07
    End If
End If
tax = sTax
0
Comment
Question by:Jenny30
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2784742
you should be able to do it the way you printed all the other information...

btw, even if i help you solve this, give these points to AZWolf
0
 
LVL 9

Accepted Solution

by:
GivenRandy earned 90 total points
ID: 2784759
Like this:

Pic1.Print Tax

Also, you can reduce your Tax() function to the following -- it is smaller, faster, easier to read, etc.

Private Function Tax() As Single
    If txtState <> "MS" Then
        Tax = 0
    Else
        Tax = Price * 0.07
    End If
End Function

This is PROVIDED you meant the second

   If txtState = MS Then

to be

   If txtState = "MS" Then

instead.  Did you?
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2784763
i'm sure thats what it should read
0
 

Author Comment

by:Jenny30
ID: 2784773
thank you...it works now...everyone has been so helpful to me...i intend to take VBasic as far as i can b/c i want to know it like an expert...this is my first programming language that i have taking at school...it is a requirement in the LAN Networking curriculum...we went over If,then,else and Case statements;Data files;the fartherest we got were Loops, but i intend to do a little studying on my own...i believe the language is really interesting and intend to take it farther than what i have learned...Thank you all for your help...
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question