Loop Words For A Number Of Times?

Feb 10, 2009

Is there a way to loop words for a number of times (like i want to loop a word for only 10 times....How would I go by doing that?)

Quote:

Originally Posted by EXample Like I want to have a textbox and If i put 10 in the textbox It would loop the word ten times or is I put 20 in the textbox it would loop 20 times ..and ..etc...and ...etc...

View 11 Replies


ADVERTISEMENT

Random Number Of 6 (1 ,6), And To Loop It 3 Times?

Feb 16, 2009

I need a random number of 6 (1 ,6), and to loop it 3 times. I tried this but it gives me error for - if myRandom.next(1,6) Then:

Dim myRandom As Random()
For i As Integer = 1, 3
If myRandom.next(1, 6) Then
End If
Next

Also I need to know the code for putting a picture into a picture box.

View 4 Replies

Save Multiple Times By Doing A LOOP Depending On The Number Of Checked Checkboxes On A Datagridview .NET 2010?

Oct 11, 2011

I have a datagridview with checkboxes in the first column and I want to do a loop on saving the serialnumber(s) when the users decides to check a number of checkboxes Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

the problem with this code is that it only inserts the serial number of the LAST checked checkbox and the number of entries of it depends on the number of checked checkbox for example ... if I checked the rows with the serialnumber 123 and 55652341, first the row with the serial number 123 then second 55652341, only 55652341 appears in the database and it is entered twice(twice because two checkboxes are checked)

View 2 Replies

Make A Coin Toss Program Where One Toss A Coin A Certain Number Of Times Then Repeat It A Certain Number Of Times?

Nov 21, 2010

i am trying to make a coin toss program where you toss a coin a certain number of times then repeat it a certain number of times.
the problem i have is "heads(counter2)" the word "heads" has a blue error line under it how do i sort the error out and also is all the code right

Public Class Form1
Dim tosses, repeat, heads As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code]....

View 1 Replies

Random Number Generator Generating Same Number Many Times?

Sep 17, 2011

I have this program generating a firstname and lastname from a file. When I run this program I enter information in three textboxes. The first two are the salary low and high(salary1.text, salary2.text) and the last one is the number of "copies"(copies.text) that I want.. When I put a number such as 10 in the text box it outputs some of the same names. The firstname file has around 100 records and the lastname file has about 1000 records Why is it generating the same name The problem is even worse if I do something like 1000 copies.. it outputs the same thing 8 times and then does something different another 8 times

Public Class Form1
Dim sex As String
Function randomfirstname()
Dim infile As IO.StreamReader

[code]....

View 1 Replies

How Many Times Is The Loop Executed

May 6, 2009

i = 5, j = 15
do while (i<j)
i=i+1
j=j-1
end while

how many times is the loop executed? is this 4?

final value of i? 9?
final value of j? 10?

when would you do a do while versus a for next loop?if the upperbound of a one dimensional array is 10, what is the size of the array? 11?CAN I GET HELP WITH THIS

dim x(20,2), y(20,2) as integer
dim i as integer
for i = 4 to 12 step 4

[code]....

how many times is the loop executed? 3?what is the value of i after the code is executed?if x and y are dimensioned as dim x(10),y(10,2) as integer, what would happen in the code?

View 9 Replies

Run A Loop Multiple Times?

Sep 28, 2009

I read the lines from a textfile into a string array and then I use a foreach loop on the string array. I want to go through the same string array again after the loop reach the end of the string array

View 1 Replies

VS 2008 Very Different Times For The Same For Next Loop?

Sep 15, 2010

I have about 1.000 text files in a folder, and I wanto to make some statistics reading the files content.In the first place I store the files path + name in a MyFiles() array, then, when I press a "Start" button I read the several files:

For x As Integer = 0 To MyFiles.Length - 1
FileReader = My.Computer.FileSystem.ReadAllText(MyFiles(x))
(data processing)
(data processing)
next

then I have copied and pasted the first 500 files in a new folder and added to the code if x > 500 the stop The strange thing is this: to elaborate the 500 files of the second folder takes about 4 seconds, to elaborate the first 500 files of the first folder (THAT ARE IDENTICAL TO THE 500 FILES OF THE SECOND FOLDER) takes 7 seconds.The same identical code takes different times to elaborate the same identical files if they are stored in different folders with different files number.

View 2 Replies

Delay Of In Interval With The Loop Of 10 Times?

Jan 12, 2011

i want to do this with the delay of in interval with the loop of 10 times.

for n=0 to 10
label.text="0"
time delay of 1 second
label1.text="1"
end loop

But when i m using executing the loop completes it iterations and timer just show work in last iteration.

View 5 Replies

How To Loop InputBox Multiple Times

Feb 24, 2012

I'm trying to loop the inputbox 5 times but I'm not sure how.
Dim payroll1 As String
payroll1 = InputBox("What is the payrolls for store1", "Inc", , , )
Lblstore1.Text = payroll1
I can get it to loop till a specific amount but not 5 times exactly.

View 9 Replies

Loop 25 Times As Atm It Keeps On Going And Wont Stop?

May 19, 2011

i have been working on maths game program for college and have advanced to the part where i have random questions asked repeatedly.

i need it to loop 25 times as atm it keeps on going and wont stop. also i need it to count how many are right, and each question they answer they get 2 chances to get it right or the game ends.but i dont know how to do any of this. this is my code so far for the questions

[Code]...

View 7 Replies

Loops - How Many Times Is The Loop Executed

May 6, 2009

[Code]...

how many times is the loop executed? what is the value of i after the code is executed? if x and y are dimensioned as dim x(10),y(10,2) as integer, what would happen in the code? what would happen in the code if the first statement was for i = 14 to 12 step 4?

View 2 Replies

Forms :: Choosing The Amount Of Times A Loop, Or Sub Should Occur

Mar 29, 2009

I have made an app that the user has to type a number, and i want the process for the app to do this how evermany times the user wishes it to do.

for example, the app is ment to create a line in a text document, so they write in textbox1 what they want written on the line, and then in textbox2, tey say how many lines they want to create.

So,

TextBox1.Text = "BLAA"
TextBox2.Text = "782"

It will create 782 lines of BLAA. not just one...

View 2 Replies

Convert Words To Number?

Jan 24, 2010

i want to know perfect convert all number to values like two to 2 two thousand to 2000

View 3 Replies

How To Convert Number To Words

Oct 7, 2010

I am using Visual Studio 2008 professional edition . i really do not know of what will be the codes that i am going to input. by the way this is the scenario: on Textbox is a number then label should be the in words of the number from the textbox. for example : (textbox) 1500.05 = (Label) One Thousand Five Hundred Pesos and Five Centavos.

View 2 Replies

How To Find Number Od Words In Pdf

Mar 9, 2009

,how to find the number of words presented for a page in the pdf file using itextsharp. To get total number of page--reader.NumberOfPages.Like wise i need how to get total number of words for a page.

View 6 Replies

Number Of Seconds Between Times

Jul 16, 2009

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim timeN As DateTime
Dim timeF As Date = #7/11/2009 12:43:20 PM#
Dim timeR As TimeSpan
timeN = DateAndTime.Now
timeR = ?????
End Sub
End Class
TimeN is system time. TimeF is a fixed date and time. All I need is the number of seconds between fixed and system(now) for timeR (and counting).

View 5 Replies

VS 2005 - Loop Starts In X Then Loops Through Y 20 Times Then Goes Back And Finishes X

Dec 6, 2010

The following loop starts in x then loops thru y 20 times then goes back and finishes x. how do I get it to loop thru x then complete loop y then loop x once more then loop y completely again 20 times then back to x and another 20 ys. there should be 200 loops today.

CODE:

I need to figure this out as part of a larger program.

View 1 Replies

Counting Number Of Words In RichTextBox?

May 28, 2009

How to count no of Words in A RichTextBox?

View 9 Replies

Checking If The Number Of Times Have Sum Of Grades Is =6?

Nov 16, 2009

i am using a combo-box to add different grades to a column in a datagrid and i am using a loop to check if the sum the total number of sum i have made when ever i select a a grade from the combo-box.This is because i want to only add six grade and not more than six but the code i am using is giving me problems This is my code.This code is adding the total grade for me bur i want to check with a loop that will only allow the adition of only six different grade but when i run my program and begin to select the grades it just give me a message form my message box 'This is calculating the grades of an applicant

Private Sub cmbgrade_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbgrade.TextChanged
If Me.cmbgrade.Text = "A" Then
Me.txttotalaggregate.Text = (CInt(Me.txttotalaggregate.Text) + 1).ToString
End If

[code]....

View 1 Replies

Count Number Of Times A Textbox Was Used?

Apr 10, 2011

This text book i have is not very good at all. the exercise's at the end of each chapter ask u to code projects without first covering the basic of what u will need do to code them. (Programming in Visual Basic 2008 Julia Case Bradley + Aninta C. Millspaugh)

Design and code a project to calculate the amount due and provide a summaray of rentals. All movies rent for $1.00 and all customers receive a %10 discount. The form should contain input for the member number and the number of movies rented. INside a groupbox display the rental amount, the 10 percent discount, and the amount due. inside a second groupbox, display the number of customers served and the total rental income.(afterdiscount).Include buttons for Calculate, clear, print and exit. The clear button clears the information for the current rental but does not clear the sumarry information. A print button allows the user to print the form. Do not allow bad input data to cancel the program; instead display a message to the user.[code]...

View 1 Replies

Counting How Many Times Certain Number Appear In One Column

May 31, 2010

I have an SQL database with a single table with several colunmns. I want to count how many times a certain number appears in one of the columns. E.g. I have the following:
A B C
8 4 6
0 9 3
1 4 6
4 7 1

I want to count the number of times 4 is used in column B. I have looked at using the following, but not sure if this is even the right approach:
Dim db as New MainTblDataSet
Dim BCount = Aggregate B In db.MainTbl Into Count(B.B = num)
where num=the number I am counting the instances of (4 in this case).
The hope is that BCount will equal 2, but it returns 0 every time.

View 3 Replies

How Many Times We Enter A Number Into An Inputbox

Nov 16, 2011

Basicly my instructor said that we have to make a program that will count how many times we enter a number into an inputbox, he also said we had to use a while loop. [code]

View 4 Replies

Increase Number Of Times It Pings?

Oct 29, 2009

On the ping method, how do you increase the number of times it pings? I'd like it to ping 80 times at once.

View 4 Replies

Change Code To Work A Certain Number Of Times?

Dec 23, 2011

My code gets a list of words from a txt file and chooses the words randomly. However, the same word can appear more than once and i need to know how to stop this from happeningHere is the code:

Dim aryName As String() = Nothing
aryName = File.ReadAllLines(Application.StartupPath & "Randomfnames.txt")
Dim randomWords As New List(Of String)

[code].....

View 3 Replies

Client That Appears Same Number Of Times As There Are Keywords

Dec 13, 2011

I know it sounds strange but let me it explain. It has a purpose, but really all I'm looking for is the item with the most duplicates.I know it's possible and I've had a few ideas already, though none were successful or practical.What I'm doing here that requires this is creating an intuitive search for clients in a database. You type in a single field and click search. Behind scenes each keyword broken down from the single input field is searched through the table of clients, hitting each column and returning matches. the results are large in numbers, but truly it's the client that appears the same number of times as there are keywords.

View 1 Replies

Counting Of Number Of Times Arrow Pressed?

Jun 21, 2012

i made a tool which detects arrow keys .When i click up it shows the word up in text box when i click down arrow it shows down word vice versia.

My problem is i want to count the number of times i clickd an arrow and want to save it in text doc with time and date

View 7 Replies

Number Of Times A Character Appears In A String?

Nov 11, 2009

How can I count the amount of times a character appears in a string?

The assignment is to create a program with 2 text boxes, label, and a button. We then need to type a phrase into the first text box, and a character in the second. Then click the button and then the label will display the output of how many times the character in the second text box appears in the first.

I have all the above setup except for how to display the amount of times the character appears in the first text box, here's a picture:

View 8 Replies

Recordset Returns 3 Times The Number Of Rows

Dec 15, 2010

I'm trying to run a simple select statement using an ADO recordset. But the resulting recordset returns 3 times the number of rows. For example the query should return 20 rows but is repeating 2 more times and returning 60 rows. When I run the query in Oracle it returns 20 rows.

Here's the code.

sSql = "Select * from Sector"
cnnOracle.Open("DRIVER={Microsoft ODBC for Oracle};SERVER=REPDATA.world;UID=auser;PWD=auser;")

[Code]....

View 9 Replies

VS 2010 Looping Code X Number Of Times?

Apr 3, 2011

Okay, so basically I'm trying to have my application randomly select items from a (multiselect) listbox. I want the user to enter the amount of items they would like randomly selected and it should all happen at the same time. I have the random shuffle down but it only selects one song each time you click the button. How can I loop this code as many times as the user specifies in the textbox?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
Dim shuffle As New Random
Main.songlist.SelectedIndex = shuffle.Next(0, Main.songlist.Items.Count - 1)

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved