Go Back   Flash Flash Revolution > General Discussion > Chit Chat
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 02-28-2008, 03:27 PM   #1
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Ned halp with Visual Basic

Hah, I have no idea if I can put this here or not, but oh well~
My teacher said I need to generate 6 random numbers in excel, with no repeats, and a timer between each number appearing. Excel has a Visual Basic thingy in it, which is basically what the macro's are. But anyway. I need someone to help me make the code to generate 6 random numbers, between 1-100, with no repeats, and a timer between each number appearing. I need the numbers to appear in cells A1 to A6. Anyone up to the job? ;3

Last edited by SyntheticDarkness; 02-28-2008 at 03:46 PM..
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 03:29 PM   #2
HighBuddha
FFR Player
FFR Veteran
 
HighBuddha's Avatar
 
Join Date: Nov 2006
Posts: 250
Default Re: Ned halp with Visual Basic

don't ask for people to do your homework for you also i think this is the wrong forum.
edit: nvm i thought there was a code forum for some reason
HighBuddha is offline   Reply With Quote
Old 02-28-2008, 03:34 PM   #3
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Re: Ned halp with Visual Basic

Not homework, coursework. ^^
And I've already tried whoring google for help, no luck.
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 03:37 PM   #4
JKPolk
tool
 
JKPolk's Avatar
 
Join Date: Aug 2003
Location: satan
Age: 37
Posts: 3,737
Send a message via AIM to JKPolk Send a message via Skype™ to JKPolk
Default Re: Ned halp with Visual Basic

You're an idiot.

http://www.ozgrid.com/forum/showthread.php?t=76232
__________________
JKPolk is offline   Reply With Quote
Old 02-28-2008, 03:42 PM   #5
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Re: Ned halp with Visual Basic

That would generate repeats.
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 03:43 PM   #6
JKPolk
tool
 
JKPolk's Avatar
 
Join Date: Aug 2003
Location: satan
Age: 37
Posts: 3,737
Send a message via AIM to JKPolk Send a message via Skype™ to JKPolk
Default Re: Ned halp with Visual Basic

Then learn to do an if statement. I'm not doing the project for you, this is easy stuff. If you don't understand it, try asking your teacher for help. Like you're supposed to.
__________________
JKPolk is offline   Reply With Quote
Old 02-28-2008, 03:45 PM   #7
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Re: Ned halp with Visual Basic

Lawl, I never asked you to do it, I asked for help. xD
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 03:50 PM   #8
EDEdDNEdDYFaN
FFR Veteran
FFR Veteran
 
EDEdDNEdDYFaN's Avatar
 
Join Date: May 2003
Posts: 2,118
Send a message via AIM to EDEdDNEdDYFaN
Default Re: Ned halp with Visual Basic

Quote:
Originally Posted by SyntheticDarkness View Post
Lawl, I never asked you to do it, I asked for help. xD
He gave you a link that essentially tells you everything that you need to do. And considering you seem to be too lazy to think for yourself heres a clue (If the vb in excel is similar to normal vb)

Code:
If intX = intY or intZ or intEtc then
   intX = int((100 - 1 + 1) * rnd ) + 1
else
   intX = intX
end if
Hopefully you'll be able to think of the solution from there, otherwise you need to start using the rest of your brain some more.
__________________

EDEdDNEdDYFaN is offline   Reply With Quote
Old 02-28-2008, 03:54 PM   #9
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Re: Ned halp with Visual Basic

Oh right, see, that's helpful. ;o
Thanks. ^^

Last edited by SyntheticDarkness; 02-28-2008 at 04:01 PM..
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 05:16 PM   #10
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Re: Ned halp with Visual Basic

Done it. I made it generate 6 numbers between 1-6, with a 1 second delay between each, no duplicates. Also, ph34r my sloppy coding skillz. ;3

Quote:
Sub Macro6()
Application.OnTime Now + TimeValue("00:00:01"), "Rand1"
Application.OnTime Now + TimeValue("00:00:02"), "Rand2"
Application.OnTime Now + TimeValue("00:00:03"), "Rand3"
Application.OnTime Now + TimeValue("00:00:04"), "Rand4"
Application.OnTime Now + TimeValue("00:00:05"), "Rand5"
Application.OnTime Now + TimeValue("00:00:06"), "Rand6"
Range("G6").Select
End Sub

Sub Rand1()
Range("F1").Select
ActiveCell.FormulaR1C1 = Int((StaticRnd() * 6) + 1)
End Sub

Sub Rand2()
Rand2:
Range("F2").Select
ActiveCell.FormulaR1C1 = Int((StaticRnd() * 6) + 1)
If Range("F2") = Range("F1") Then
GoTo Rand2
End If
End Sub

Sub Rand3()
Rand3:
Range("F3").Select
ActiveCell.FormulaR1C1 = Int((StaticRnd() * 6) + 1)
If Range("F3") = Range("F1") Or Range("F3") = Range("F2") Then
GoTo Rand3
End If
End Sub

Sub Rand4()
Rand4:
Range("F4").Select
ActiveCell.FormulaR1C1 = Int((StaticRnd() * 6) + 1)
If Range("F4") = Range("F1") Or Range("F4") = Range("F2") Or Range("F4") = Range("F3") Then
GoTo Rand4
End If
End Sub

Sub Rand5()
Rand5:
Range("F5").Select
ActiveCell.FormulaR1C1 = Int((StaticRnd() * 6) + 1)
If Range("F5") = Range("F1") Or Range("F5") = Range("F2") Or Range("F5") = Range("F3") Or Range("F5") = Range("F4") Then
GoTo Rand5
End If
End Sub

Sub Rand6()
Rand6:
Range("F6").Select
ActiveCell.FormulaR1C1 = Int((StaticRnd() * 6) + 1)
If Range("F6") = Range("F1") Or Range("F6") = Range("F2") Or Range("F6") = Range("F3") Or Range("F6") = Range("F4") Or Range("F6") = Range("F5") Then
GoTo Rand6
End If
End Sub

Last edited by SyntheticDarkness; 02-28-2008 at 05:19 PM..
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 05:18 PM   #11
All_That_Chaz
Supreme Dictator For Life
Retired StaffFFR Veteran
 
All_That_Chaz's Avatar
 
Join Date: Apr 2004
Location: South Jersey
Age: 39
Posts: 5,874
Send a message via Skype™ to All_That_Chaz
Default Re: Ned halp with Visual Basic

vb's so cute.
__________________
Back to "Back to Earth"
Quote:
Originally Posted by FoJaR View Post
dammit chaz
Quote:
Originally Posted by FoJaR View Post
god dammit chaz
Quote:
Originally Posted by MalReynolds
I bet when you live in a glass house, the temptation to throw stones is magnified strictly because you're not supposed to.
All_That_Chaz is offline   Reply With Quote
Old 02-28-2008, 05:21 PM   #12
Problems
FFR Player
FFR Veteran
 
Problems's Avatar
 
Join Date: Apr 2005
Posts: 513
Default Re: Ned halp with Visual Basic

If you ever need any more help and can't find any PM me 'cause my dad has like 15+ years in vb (and a buttload of other comp language) experience, but I'm sure FFR would be more convenient.
Problems is offline   Reply With Quote
Old 02-28-2008, 05:46 PM   #13
SyntheticDarkness
FFR Player
 
SyntheticDarkness's Avatar
 
Join Date: May 2005
Location: London.
Age: 32
Posts: 42
Send a message via AIM to SyntheticDarkness Send a message via MSN to SyntheticDarkness Send a message via Skype™ to SyntheticDarkness
Default Re: Ned halp with Visual Basic

Mmk, thanks.
SyntheticDarkness is offline   Reply With Quote
Old 02-28-2008, 06:14 PM   #14
All_That_Chaz
Supreme Dictator For Life
Retired StaffFFR Veteran
 
All_That_Chaz's Avatar
 
Join Date: Apr 2004
Location: South Jersey
Age: 39
Posts: 5,874
Send a message via Skype™ to All_That_Chaz
Default Re: Ned halp with Visual Basic

Visual Basic isn't even going to be supported anymore starting like... now, so don't bother. Anyone teaching vb is out of their mind.
__________________
Back to "Back to Earth"
Quote:
Originally Posted by FoJaR View Post
dammit chaz
Quote:
Originally Posted by FoJaR View Post
god dammit chaz
Quote:
Originally Posted by MalReynolds
I bet when you live in a glass house, the temptation to throw stones is magnified strictly because you're not supposed to.
All_That_Chaz is offline   Reply With Quote
Old 02-28-2008, 06:41 PM   #15
Kekeb
davai
FFR Veteran
 
Kekeb's Avatar
 
Join Date: Dec 2006
Age: 33
Posts: 2,765
Default Re: Ned halp with Visual Basic

Quote:
Originally Posted by All_That_Chaz View Post
Visual Basic isn't even going to be supported anymore starting like... now, so don't bother. Anyone teaching vb is out of their mind.
Welcome to poor high schools.
Kekeb is offline   Reply With Quote
Old 02-28-2008, 11:08 PM   #16
JKPolk
tool
 
JKPolk's Avatar
 
Join Date: Aug 2003
Location: satan
Age: 37
Posts: 3,737
Send a message via AIM to JKPolk Send a message via Skype™ to JKPolk
Default Re: Ned halp with Visual Basic

Welcome to a great introduction language? It's better than Scheme at teaching people the basics of coding and is also a crude way to start with OOP. Not *that* bad of a basic language.
__________________
JKPolk is offline   Reply With Quote
Old 02-28-2008, 11:17 PM   #17
Psycho8137
FFR Player
 
Psycho8137's Avatar
 
Join Date: May 2005
Location: Gotham City
Age: 35
Posts: 265
Send a message via ICQ to Psycho8137 Send a message via AIM to Psycho8137 Send a message via MSN to Psycho8137 Send a message via Yahoo to Psycho8137 Send a message via Skype™ to Psycho8137
Default Re: Ned halp with Visual Basic

ITT Post the most complex VB code you possibly can for a simple task.
__________________


^^^ Tass
Psycho8137 is offline   Reply With Quote
Old 02-29-2008, 09:04 AM   #18
All_That_Chaz
Supreme Dictator For Life
Retired StaffFFR Veteran
 
All_That_Chaz's Avatar
 
Join Date: Apr 2004
Location: South Jersey
Age: 39
Posts: 5,874
Send a message via Skype™ to All_That_Chaz
Default Re: Ned halp with Visual Basic

Quote:
Originally Posted by JKPolk View Post
Welcome to a great introduction language? It's better than Scheme at teaching people the basics of coding and is also a crude way to start with OOP. Not *that* bad of a basic language.
Oh I agree entirely. I can't think of a better way to get introduced to object-oriented programming. But it's practical uses are pretty restrictive. It's just so damn inefficient. But it was cute when I took it as my first programming class back in 10th grade.
__________________
Back to "Back to Earth"
Quote:
Originally Posted by FoJaR View Post
dammit chaz
Quote:
Originally Posted by FoJaR View Post
god dammit chaz
Quote:
Originally Posted by MalReynolds
I bet when you live in a glass house, the temptation to throw stones is magnified strictly because you're not supposed to.
All_That_Chaz is offline   Reply With Quote
Old 02-29-2008, 09:34 AM   #19
JKPolk
tool
 
JKPolk's Avatar
 
Join Date: Aug 2003
Location: satan
Age: 37
Posts: 3,737
Send a message via AIM to JKPolk Send a message via Skype™ to JKPolk
Default Re: Ned halp with Visual Basic

Fair enough. Between that and programming on my Ti-83+ I think I put in a few solid months of completely pointless work. Still learned a lot, though, while managing to make a program on my calc that took my Honors Chem final for me. Good times.
__________________
JKPolk is offline   Reply With Quote
Old 02-29-2008, 09:39 AM   #20
L0NEvvolf
FFR Veteran
FFR Veteran
 
Join Date: Nov 2006
Age: 33
Posts: 2,068
Send a message via AIM to L0NEvvolf
Default Re: Ned halp with Visual Basic

Crap to late to help sorry good job getting it done
L0NEvvolf is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution