|
-
Aug 30th, 2000, 03:32 AM
#1
Thread Starter
Fanatic Member
Does anyone know whats wrong with this code: A error is brought back saying "Object Variable or With Block variable not set"
Private Sub lvwJourneys_Click()
TxtJourneyID.Text = Trim(lvwJourneys.SelectedItem.Text)Txtjourneyfrom.Text = Trim(lvwJourneys.SelectedItem.SubItems(1))
Txtjourneyto.Text = Trim(lvwJourneys.SelectedItem.SubItems(2))
Txtstandardmiles.Text = Trim(lvwJourneys.SelectedItem.SubItems(3))
End Sub
-
Aug 30th, 2000, 05:19 AM
#2
Addicted Member
Code:
Private Sub lvwJourneys_Click()
TxtJourneyID.Text = Trim(lvwJourneys.SelectedItem.Text)
Txtjourneyfrom.Text = Trim(lvwJourneys.SelectedItem.SubItems(1))
Txtjourneyto.Text = Trim(lvwJourneys.SelectedItem.SubItems(2))
Txtstandardmiles.Text = Trim(lvwJourneys.SelectedItem.SubItems(3))
End Sub
...should work... shouldn't it? If you were trying to run the exact code you posted, you had a carriage return in the wrong place.
Visual Basic 6 Enterprise Edition + SP4
-
Aug 30th, 2000, 06:30 AM
#3
transcendental analytic
you get that error if you refer to an object reference without an object, so check out which of them isn't refering to anything at make sure either to make a new reference or you shouldn't handle the object at all, by avoiding it with errorhandling
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|