Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27373

VS 2008 Mod function

$
0
0
I need a mod function, but don't see one in the math library. I have a program that pulls data out of a list of files for different samples and writes that data to a .csv file. My samles look like w2464, but when the program gets to multiples of 20, say w2480, I need to do insert a line in my file.

I made a sample project to practice with it, and here it is:
dim sampleNum
sampleNumber = textBox1.text
If ((CInt(Mid(sampleNumber, 2, 4)) + 1) / 20) * 20 Then
MsgBox("yes it is a multiple of 20")
Else
MsgBox("no it is not")
End If

Viewing all articles
Browse latest Browse all 27373


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>