Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 9th, 2007, 08:05 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please help!!!

Hi All. I've been trying to get to grips with VB* for a while and I'm having trouble with arrays.

I'm trying to use one to select 6 random numbers and place them in 6 different text boxes, without letting them duplicate a value.

Does anyone know how I would go about this? I'm getting myself so confused. All my books talk about i's and ubounds and it's getting me in a tizz!

So far I have this:
txt1stNo.Text = CStr(Int(Rnd() * 49))
txt2ndNo.Text = CStr(Int(Rnd() * 49))
txt3rdNo.Text = CStr(Int(Rnd() * 49))
txt4thNo.Text = CStr(Int(Rnd() * 49))
txt5thNo.Text = CStr(Int(Rnd() * 49))
txt6thNo.Text = CStr(Int(Rnd() * 49))

Any ideas?

 
Old January 9th, 2007, 08:14 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I would suggest a VB forum.

--

Joe (Microsoft MVP - XML)
 
Old January 9th, 2007, 03:28 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I assumed that because a similar question had been answered before that I would get an equally cordial response.

My mistake.

 
Old January 9th, 2007, 04:11 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You do get cordial responses over here, but you get better ones if you post them in the correct category. For VB, go here: http://p2p.wrox.com/visual-basic-13

This forum is for Ajax related problems, so there'll be a lot of people here with knowledge of JavaScript, not VB. You should post in the VB category if you need VB people.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old January 10th, 2007, 04:41 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Quote:
quote:Originally posted by BellaDonna
 I assumed that because a similar question had been answered before that I would get an equally cordial response.
My mistake.
My intention was not to be rude, just to guide you to a better forum for the question. I spend a lot of time in this and other forums and no one can answer questions on every topic.

Where, in this forum, did you see a similar question that was answered?

--

Joe (Microsoft MVP - XML)








Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.