[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Using if and or

Posted on 2006-10-19
2
Medium Priority
?
145 Views
Last Modified: 2010-04-30
Hi experts
Seems like i have used this before
If txtTaxRate <> 0 Or txtTaxRate <> "" Then
I am getting: "Argument not opional" error
Am i missing something?
0
Comment
Question by:isnoend2001
[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 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 200 total points
ID: 17771149
What kind of variable is that?  Integer?  Single?  Double?  String?

Your if statement is treating it as BOTH a numeric value and a string value - you can't do that.

If String, then use this:
If txtTaxRate <> "0" Or txtTaxRate <> "" Then

If Numeric, then I'd do this:
If IsNumeric(txtTaxRate) = False Or txtTaxRate = 0 Then
0
 

Author Comment

by:isnoend2001
ID: 17771199
Thanks leew
Somehow txtTaxRate had an index  txtTaxRate(64)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 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