Increments by 10, 20, 30

S

someone

Hi All,

I need a function that only allows Increments by 10, 20, 30.....

How do I achieve this in VB Script?

Any help is appreciated.

TIA,

Santosh
 
E

Egbert Nierop \(MVP for IIS\)

someone said:
Hi All,

I need a function that only allows Increments by 10, 20, 30.....

How do I achieve this in VB Script?

Any help is appreciated.

TIA,

Public Function Inc10(inVal)
Inc10 = inVal + 10
End Function

Public Function Inc20(inVal)
Inc20 = inVal + 20
End Function

Public Function Inc30(inVal)
Inc30 = inVal + 30
End Function
 
E

Evertjan.

someone wrote on 30 dec 2004 in microsoft.public.inetserver.asp.general:
I need a function that only allows Increments by 10, 20, 30.....

How do I achieve this in VB Script?

function myIncrBy(x,y)
if y=10 or y=20 or y=30 then x = x + y
myIncr = x
end function
 
T

thorpe

if your going to use it with a 'for' loop you can use step.

example;

for i = 0 to 80 step 10
response.write(i) & "<br />"
next
 
L

Lance Wynn

Also,

Function Increment(base, additive)
if additive mod 10 = 0 and additive > 0 then
increment = base+additive
end if
end function

might work...

Hi All,

I need a function that only allows Increments by 10, 20, 30.....

How do I achieve this in VB Script?

Any help is appreciated.

TIA,

Santosh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top