Im having trouble with my assignment related to Visual
Basic, my problem is i've created one text box and one
label box. In my text box, it requires the user to type
in a number. Im trying to wrtie a code which can group
the number into different group represented by a letter.
Private Sub cmdCalculate_Click()
Dim txtAwardMiles As Integer
Dim lblAwardZone As Integer
lblAwardZone.Caption = Val(txtAwardMiles.Text)
Select Case Val(txtAwardMiles.Text)
Case 1 To 600
lblAwardZone.Caption = "S"
Case 601 To 1200
lblAwardZone.Caption = "A"
Case 1201 To 2500
lblAwardZone.Caption = "B"
Case 2501 To 5000
lblAwardZone.Caption = "C"
Case 5001 To 7500
lblAwardZone.Caption = "D"
Case 7501 To 10000
lblAwardZone.Caption = "E"
Case Is > 10001
lblAwardZone.Caption = "F"
End Select
End Sub
However when i run the problem and put number in it, the
windows came up and said:
Compile Error:
Invalid qualifier
Could anyone please help me, thanks a lot! :)
P.S I've posted the probles before and changed some of
the codes, thanks for your help, Jeremy and Mark. :)
But still can't get it working properly. 5 1247
Michael
\\\\\\\
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Select Case CType(txtAwardMiles.Text, Integer)
Case 1 To 600
lblawardzone.Text = "S"
Case 601 To 1200
lblawardzone.Text = "A"
Case 1201 To 2500
lblawardzone.Text = "B"
Case 2501 To 5000
lblawardzone.Text = "C"
Case 5001 To 7500
lblawardzone.Text = "D"
Case 7501 To 10000
lblawardzone.Text = "E"
Case Is > 10001
lblawardzone.Text = "F"
End Select
End Sub
////////
Cor
This looks like VB5/6 Code, this is a VB.NET newsgroup, please try posting
to the microsoft.public.vb[.*] newsgroup(s)
--
Happy to help,
-- Tom Spink
(th**********@ntlworld.com)
"Go down with your server" http://dotnetx.betasafe.com >> On The Mend
Please respond to the newsgroup,
so all can benefit
"Michael Mak" <cf****@hotmail.com> wrote in message
news:08****************************@phx.gbl... Im having trouble with my assignment related to Visual Basic, my problem is i've created one text box and one label box. In my text box, it requires the user to type in a number. Im trying to wrtie a code which can group the number into different group represented by a letter.
Private Sub cmdCalculate_Click() Dim txtAwardMiles As Integer Dim lblAwardZone As Integer lblAwardZone.Caption = Val(txtAwardMiles.Text) Select Case Val(txtAwardMiles.Text) Case 1 To 600 lblAwardZone.Caption = "S" Case 601 To 1200 lblAwardZone.Caption = "A" Case 1201 To 2500 lblAwardZone.Caption = "B" Case 2501 To 5000 lblAwardZone.Caption = "C" Case 5001 To 7500 lblAwardZone.Caption = "D" Case 7501 To 10000 lblAwardZone.Caption = "E" Case Is > 10001 lblAwardZone.Caption = "F" End Select End Sub
However when i run the problem and put number in it, the windows came up and said: Compile Error: Invalid qualifier Could anyone please help me, thanks a lot! :)
P.S I've posted the probles before and changed some of the codes, thanks for your help, Jeremy and Mark. :) But still can't get it working properly.
"Michael Mak" <cf****@hotmail.com> schrieb Im having trouble with my assignment related to Visual Basic, my problem is i've created one text box and one label box. In my text box, it requires the user to type in a number. Im trying to wrtie a code which can group the number into different group represented by a letter.
Maybe you should read the replies to the same question from yesterday.
--
Armin
"Armin Zingler" <az*******@freenet.de> schrieb P.S I've posted the probles before and changed some of the codes, thanks for your help, Jeremy and Mark. :) But still can't get it working properly.
Um...sorry, didn't read that... :-/
--
Armin
Hello,
"Michael Mak" <cf****@hotmail.com> schrieb: Im having trouble with my assignment related to Visual Basic,
You wanted to say "Related to Visual Basic Classic". This is a VB .NET ng,
please turn to one of the VB6 ngs (microsoft.public.vb.*).
Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET http://www.mvps.org/dotnet This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kenneth Keeley |
last post by:
Hi,
I have a ASP page on my web Site that has the following code in it.
Response.Redirect ("Validation.asp?BookingNo=45656756")
This code works fine most of the time. I have found cases when...
|
by: Allens Mail |
last post by:
Help,
Due Mon
I cant find the error. Keeps saying illegal token } have gone though code
and balance all French braces and parenthesis. Please help going crazy.
Code below
Thanks
Allen
...
|
by: Allens Mail |
last post by:
Help,
Due Mon
I cant find the error. Keeps saying illegal token } have gone though code
and balance all French braces and parenthesis. Please help going crazy.
Code below
Thanks
Allen
...
|
by: Javier Sanchez |
last post by:
Hi all,
I am experiencing a problem whereby a PL/SQL package is valid for
some time (and runs succesfully a few times) and then suddenly becomes
invalid in DB. If I recompile this package it works...
|
by: J Vaughan |
last post by:
Hi. Simple question here. I am using a table (not for layout) as
follows:
<table>
<tr><th>Name:</th><td>Fred</td></tr>
<tr><th>Tel:</th><td>11111111</td></tr>...
|
by: bradleyc |
last post by:
Definately need my eyes checked...
Error:asstester.cpp(300,1):Declaration missing ;
Error:asstester.cpp(300,1):Compound statement missing }
void doModify()
{
clrscr();
char inputv,...
|
by: bradleyc |
last post by:
If i enter 1, 2, 3, 4 ... still returns "ERROR: Invaild Input"
clrscr();
cout << " " << endl;
cout << " Which event would you like to select? "<<endl;
cout << ""...
|
by: MCPD |
last post by:
hello
i have an aspx page that Contains tow textBoxs and Button
i Must enter a correct username at the textbox 1 and password in textbox 2 that exists in database
my command have this code...
|
by: mjweiner |
last post by:
I have an ajax.asp.net application that is running very well, however,
my error log is continuing to fill with "padding is invalid and cannot
be removed" These errors report that the url with the...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |