Hello,
randomize is a function in vbscript.
What is the function for vb ?
(I have tried to use that command in the script in web-service of .net,
which used VB and not VBScript).
Thanks :) 4 6694
Have a look at the System.Random class. It provides better support for
random numbers than the classic VB functions.
If you want to keep using the classic functions, though, you can use
"Randomize. "
"Mr. x" <a@b.com> wrote in message
news:eP******** ******@TK2MSFTN GP12.phx.gbl... Hello, randomize is a function in vbscript. What is the function for vb ?
(I have tried to use that command in the script in web-service of .net, which used VB and not VBScript).
Thanks :)
"Mr. x" <a@b.com> schrieb Hello, randomize is a function in vbscript. What is the function for vb ?
(I have tried to use that command in the script in web-service of .net, which used VB and not VBScript).
Thanks :)
I don't know VBscript, but in VB.Net you can use
Microsoft.Visua lBasic.VBMath.R andomize
There is also the System.Random class.
--
Armin
try this for vb6
dim d
d=rnd * 100
debug.print d
rnd will always return a float value between 0 and 1
"Mr. x" <a@b.com> wrote in message
news:eP******** ******@TK2MSFTN GP12.phx.gbl... Hello, randomize is a function in vbscript. What is the function for vb ?
(I have tried to use that command in the script in web-service of .net, which used VB and not VBScript).
Thanks :)
Hello,
"Mr. x" <a@b.com> schrieb: randomize is a function in vbscript. What is the function for vb ?
(I have tried to use that command in the script in web-service of .net, which used VB and not VBScript).
'Randomize' won't return a pseudo-random number in VBScript. You have to
use 'Rnd' to generate the number.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET http://www.mvps.org/dotnet This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fieldmedic |
last post by:
I'm trying to determine the best way to randomize a set of array items. I'm
thinking that I could use an arraylist and have it use the lower and upper
bounds as the limits. Any suggestions?
Cheers,
Steve
|
by: Gaffer |
last post by:
Hello
Is there a way in which I can make certain parts of Html on my website
random so that each viewer will see different material if they refresh the
page or come back onto the website later? I am currently using the
"<!--#include virtual="cgi-bin/menu1.txt" -->" command to display my menus
on every page of my site, so that the same material is shown on every page,
and I would like a way that I can randomize this perhaps.
I got a...
|
by: Ellen Manning |
last post by:
I've got an A2K database with a report that generates any number of
random medical record numbers. The user inputs how many numbers they
want and report uses the Randomizer function found on "The Access Web"
site to generate these numbers. Out of 38000 records, there are 900
unique medical record numbers. I run the randomizer function on a
query of these unique medical record numbers.
The user states there are too many duplications...
|
by: Rich |
last post by:
Here is what I am trying for randomizing 2 numbers in the same subroutine so
that they are not equal to each other:
Dim j As Integer, k As Integer
j = New System.Random().Next(0, 10)
k = New System.Random().Next(0, 10)
But j and k are always equal to each other. So I through in Randomize( ) but
that did not help. Is it possible to randomize 2 different numbers in the
same sub so that they are not equal to each other? How to do this?
|
by: Arnold |
last post by:
Hi there,
Here's the situation--there is a text field in a form in which students
will key in data. On the keypress event, I'd like for different sounds
to be played for each character typed, either randomly or in a loop (I
have a number of small, cool, computer-like sounds). I can get one
sound to play for the keypress event, but don't know how to play
multiple sounds.
Here's the codes for playing one sound...
| |
by: Badass Scotsman |
last post by:
Hello,
This code is supposed to generate a random string each run, however I have
had it live on a few sites, and it seems to create repeat strings all over
the place.
-------------------------------------------------------------
<%
FUNCTION GetRandomCode(randomcode,codelength,numberofcombinations)
codecharacters = 35
|
by: mrtaka79 |
last post by:
Okay, first of all, I'm a complete noob, so go easy on me. I have this
code that works perfectly for me. The only thing I want to add is to
randomize the pictures/links that show up. Can anyone just tell me
where to add additional code to the following? BTW this is the only
code I could find that works in my Beta Blogger sidebar.
<a href="javascript:gotoshow()"><img border="0" width="300"
src="/OneMissedCall1.jpg" name="slide"...
|
by: VBSTUDENT |
last post by:
I am just wondering if there is a way to randomize the aritmetic operators in code, I know how to randomize numbers but I am not sure if it is possible to randomize operators.
Any help would be appreciated
Thanks
|
by: gggram2000 |
last post by:
Hi,
I'ved spent two full days trying to find a solution, I can randomize numbers between two ranges and it works fine, But my problem is when i want to randomize five numbers that I got. eg.
I randomize 1-100 and I get 50.
I randomize 1-900 on another input field and I get 578.
I randomize 2-56 and get 31.
" " and get 43.
" " and get 78.
So I have five numbers: 50, 578, 31, 43 and 78.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |