Solved

easy point

Posted on 1998-11-08
1
125 Views
Last Modified: 2010-04-30
In pascal or c, there is a function named 'rem' and 'mod' which return the reminder of the division. Like

         a = 5 rem 2;

then  1 will be stored into a.

         a = 17 rem 3;

then 2 will be stored into a.

Could I get this rem and mod function in vb.
If yes, how, I would like an example.
If no, how can I build this function, I would like a complete code.


Thank a lot.  
0
Comment
Question by:math253
1 Comment
 

Accepted Solution

by:
thunderbug110898 earned 200 total points
ID: 1443871
in VB:

Dim x As Integer

x = 10 mod 2

MsgBox x  ' this will display 0

x = 10 mod 3

MsgBox x ' this will display 1

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now