473,396 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Fill labelbox with characters

I have labelbox1 that generates a random number between 0 and 12. In
labelbox2 I want it to be filled with an ascii character code "chr(73)".
What ever number appears in the labelbox1 is how many characters I want to
appear in labelbox2.

Thanks for any help
sc
Nov 21 '05 #1
2 1238
Hi Steve

I think I understand what you mean. Do this:

Start a new Windows application

Add two labels to your form (Label1 & Label2 respectively)

Add a button (Button1)

Double-click the button & paste in the following text:

Label1.Text = CInt(Int((12 * Rnd()) + 1))
Label2.Text = StrDup(CInt(Label1.Text), Chr(73))

The 'StrDup takes the number from the first label, converts it to integer.
The second parameter is your character (chr(73) or '1') is then duplicated.

I hope I understood you correctly & this has helped.

"Steve" wrote:
I have labelbox1 that generates a random number between 0 and 12. In
labelbox2 I want it to be filled with an ascii character code "chr(73)".
What ever number appears in the labelbox1 is how many characters I want to
appear in labelbox2.

Thanks for any help
sc

Nov 21 '05 #2
Worked great. Thanks for the help.

"Steve" <kg******@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
I have labelbox1 that generates a random number between 0 and 12. In
labelbox2 I want it to be filled with an ascii character code "chr(73)".
What ever number appears in the labelbox1 is how many characters I want to
appear in labelbox2.

Thanks for any help
sc

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: edward hage | last post by:
Hello, I don't seem to get the following right. In the following I try to fill a MySQL table named 'mutation'. The first element is a date but MySQL sees this as 0000-00-00 instead of the date...
2
by: Matthew | last post by:
Is there a javascript or alternative default fill friendly way for counting down the remaining characters left in a form box?
4
by: Barry Margolin | last post by:
Can I do the following with Javascript? My state has a web site that can be used for online filing for unemployment benefits. Every week I have to go to the site and fill in a form, checking...
0
by: David Scemama | last post by:
Hi, I'm trying to fill a text control or a rich text control with the ASCII characters table, using code page 437. All the characters appears correctly except the semi graphic ones. Does...
4
by: TS | last post by:
Hi, I'm using the ConvertCurrencyToEnglish module readily available on the internet to convert some currency figures to text. However, I want the code do one additional thing and I'm not sure how...
4
by: David | last post by:
Anyone, Does anyonee now how to use the following outline to fill a matrix with zeros and call on the first function in the following program? void fill_with_zeros(int *mat){...
17
by: JC | last post by:
sorry . i got one more problem i got a string with 4 char. i want to put that in a string with 26 char. how can i fill space on the remain char.. ?? is that i need to do a while loop do fill the...
3
by: pedestrian via DotNetMonster.com | last post by:
Let's say I declares an array of string (of size 1000), how to fill every elements of it with random characters? Dim myStrArray(999) As String ... Thanks... -- Pedestrian, Penang.
2
by: RP | last post by:
I have an Access Table with following columns: GID (auto number) PID number TreeID Text ItemName Text This table consists of records in the following manner: GID PID TreeID ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.