Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 16th, 2005, 8:17 AM   #11
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
To modify an item in a list you do:
List1.list(n) = "Contents"
where n is the index base 0. This may not work for VB5: if so you'll have to remove the item and then add it at the previous index to achieve this.
Rory is offline   Reply With Quote
Old May 16th, 2005, 9:05 AM   #12
thomzor
Newbie
 
Join Date: Apr 2005
Location: The Netherlands
Posts: 20
Rep Power: 0 thomzor is on a distinguished road
Quote:
Originally Posted by killcity44
Im still egtting the same problem


'calculate first ticket
Dim i_TEMP As Integer
If not (txtConcert1.Text = "" Or txtTicket1.Text = "" Or txtQTY1.Text = "0") Then
i_TEMP = txtTicket.Text
txtTotal1.Text = i_TEMP * txtQTY1.Text

End If

'calculate second ticket

If not(txtConcert2.Text = "" Or txtTicket2.Text = "" Or txtQTY2.Text = "0" Then
i_TEMP = txtTicket2.Text
txtTotal2.Text = i_TEMP * txtQTY2.Text

End If

'calculate second ticket

If not(txtConcert3.Text = "" Or txtTicket3.Text = "" Or txtQTY3.Text = "0") Then
i_TEMP = txtTicket2.Text
txtTotal3.Text = i_TEMP * txtQTY3.Text

End If

'calculates sub total

lblSubTotalDisplay.Caption = CInt(txtTotal1.Text + txtTotal2.Text + txtTotal3.Text)

'calculates charges
dude
the

if (blab) then
'do nothing
else


this is totally gay, use NOT instead - for real...

also this stuff is not foolproof
if you put 'asd' in the textboxes the app will crash(presumably)
try to work around this by checking the ascii codes

txtAsd_Change(?)
if asc(mid(txtAsd.text,len(txtAsd.text)-1,1)) < 48 OR > 57 Then txtAsd.text=""
end sub


i haven't programmed in vb that much lately but this should get u started and perhaps help you out a bit

if you need anything more just post here
thomzor is offline   Reply With Quote
Old May 16th, 2005, 5:50 PM   #13
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
IsNumeric() would also work!
Rory is offline   Reply With Quote
Old May 23rd, 2005, 4:58 AM   #14
killcity44
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 killcity44 is on a distinguished road
works fine now thanks, except for the list box modification part. I have a text box and a list box with a few entries. I want to change the list boxes selection to what's i the text vox,

hope that explains that clearly
killcity44 is offline   Reply With Quote
Old May 23rd, 2005, 12:09 PM   #15
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
I believe
lstMain.List(lstMain.ListIndex) = txtMain.Text
will work under VB6.
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:14 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC