Solved

how to add numbers such as 1+1 to get 2 not 11

Posted on 1998-11-26
2
133 Views
Last Modified: 2010-05-03
okay i have beat my head against the wall for ever trying to get the right code to add two numbers to get there sum as in 1+1=2 not 11 can you guys help :)
0
Comment
Question by:chuk1
2 Comments
 

Accepted Solution

by:
Belgarion_aus earned 50 total points
ID: 1447042
Some Code......

Dim x as integer

x = 1 + 1


if you working with text:

x = val("1") + val("1")

both examples will return 2

0
 

Expert Comment

by:ChasDevlin
ID: 1447043
I imagine you are working with strings or variants.

text1.value = cstr(cint("1") + cint("1"))


0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSRS expression Issue finding a string 10 79
Validating VB6 Function 19 59
RUNRMTCMD from AS/400 12 47
VBA: copy range dynamically based on config sheet v2 3 34
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

778 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