Argh Visual Basic |
Author: |
Message: |
Wabz
Elite Member
Its Groovy Baby!
Posts: 3459 Reputation: 29
39 / /
Joined: Jan 2003
|
O.P. Argh Visual Basic
I'm stuck again. I'm attempting to make something which displays timetables 1-12 .
So it would display like this
1 * 1 = 1 2 *1 = 1
1 * 2 =2 2 *2 = 2
1 * 3 =3 2 *3 = 6
Any sugguestions I've really had enough everything i try just breaks.
Its the second thing I'm struggling with
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
|
|
03-03-2005 07:02 PM |
|
|
CookieRevised
Elite Member
Posts: 15517 Reputation: 173
– / /
Joined: Jul 2003
Status: Away
|
RE: Argh Visual Basic
The question/problem is to vague though. I could post the code to generate those tables, but it highly depends on exactly how you want to display them and where you want to display them...
In essence it will just be some simple nested FOR...NEXT loops.
It would be better if you attach your code, so it can be fixed in the way you need it.
This post was edited on 03-03-2005 at 07:37 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
|
|
03-03-2005 07:35 PM |
|
|
Wabz
Elite Member
Its Groovy Baby!
Posts: 3459 Reputation: 29
39 / /
Joined: Jan 2003
|
O.P. RE: Argh Visual Basic
K Cookie well I'll try and make some sense of it myself to make it sort of work before i even post it
[edit] This is actually way harder than I thought , basically all I need to do is have all the times tables print to a form. on the click of a command button. I'm reading up on something called tabs at the moment I don't know if this is the way to go but it seems to look hopeful
This post was edited on 03-03-2005 at 07:44 PM by Wabz.
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
|
|
03-03-2005 07:40 PM |
|
|
CookieRevised
Elite Member
Posts: 15517 Reputation: 173
– / /
Joined: Jul 2003
Status: Away
|
RE: Argh Visual Basic
In essence it would be something like:
code: For TimesTable = 1 to 10
For Number = 1 to 10
Debug.Print Number & " x " & TimesTable & " = " & (Number * TimesTable)
Next Number
Next TimesTable
.-= A 'frrrrrrrituurrr' for Wacky =-.
|
|
03-03-2005 07:44 PM |
|
|
Wabz
Elite Member
Its Groovy Baby!
Posts: 3459 Reputation: 29
39 / /
Joined: Jan 2003
|
O.P. RE: Argh Visual Basic
Well that worked
I'm sort of trying to teach myself Vb too fast I think and I keep falling over.
[edit] Got it to print to a form now Just need to tidy them into rows Any ideas [/edit]
code: Private Sub cmdcalc_Click()
Dim Timestable As Integer
Dim Number As Integer
For Timestable = 1 To 12
For Number = 1 To 12
frmTables.Print Number & " x " & Timestable & " = "; (Number * Timestable)
Next Number
Next Timestable
End Sub
Never ever did one think he would use that bbcode
This post was edited on 03-03-2005 at 07:57 PM by Wabz.
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
|
|
03-03-2005 07:47 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Argh Visual Basic
to make it go into rows just add a vbcrlf like code: Private Sub cmdcalc_Click()
Dim Timestable As Integer
Dim Number As Integer
For Timestable = 1 To 12
For Number = 1 To 12
frmTables.Print Number & " x " & Timestable & " = "; (Number * Timestable) & vbcrlf
Next Number
Next Timestable
End Sub
|
|
03-03-2005 08:09 PM |
|
|
Wabz
Elite Member
Its Groovy Baby!
Posts: 3459 Reputation: 29
39 / /
Joined: Jan 2003
|
O.P. RE: Argh Visual Basic
That just spaced them out
Thanks for the input its starting to look better
Right I think its got to be the tab command some how pushed into this
I'm getting there slowly
This post was edited on 03-03-2005 at 08:40 PM by Wabz.
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
|
|
03-03-2005 08:19 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Argh Visual Basic
ah yea, i see what u mean, i just tested the code, so u want each time table set in a new column?
|
|
03-03-2005 08:41 PM |
|
|
Wabz
Elite Member
Its Groovy Baby!
Posts: 3459 Reputation: 29
39 / /
Joined: Jan 2003
|
O.P. RE: Argh Visual Basic
quote: Originally posted by Dempsey
ah yea, i see what u mean, i just tested the code, so u want each time table set in a new column?
Yup
I've been coding for nearly 7 hours now on and off. Its harder than it looks I dunno how major coders do it
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
|
|
03-03-2005 08:46 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Argh Visual Basic
once you get into it its not too bad. But about the columns, printing it onto the form i cant think of a way to put it in columns, not saying it cant be done, i just cant think how atm
|
|
03-03-2005 08:51 PM |
|
|
Pages: (3):
« First
[ 1 ]
2
3
»
Last »
|
|