Help - Search - Members - Calendar
Full Version: VB6 Problem
Pixel2Life Forum > Help Section > Desktop Programming
Sonic
Hello,

I just installed VB6 off a CD of mine and whenever I run code that has an "If statement" in it, the program crashes.

I can make buttons and all, but once I code them I get something like so:
http://img19.imageshack.us/img19/5240/visualbasicop1.jpg

Any clue as to why this may be happening?

Thanks
Mezzo
QUOTE(Sonic @ Jul 25 2007, 08:25 PM) *
Hello,

I just installed VB6 off a CD of mine and whenever I run code that has an "If statement" in it, the program crashes.

I can make buttons and all, but once I code them I get something like so:
http://img19.imageshack.us/img19/5240/visualbasicop1.jpg

Any clue as to why this may be happening?

Thanks


A few questoions:
1) Does the program crash in every single If statement. Like if you had a second text box and just set the text in it instead of a msgbox does this crash?
2) Can you post a picture (or copy the text) of the data the error report contains?
3) Have you tried re-installing VB6?

Hopefully these things will help us diagnose your problem

PS. I can't see anythign wrong with your code (I haven't coded in VB in a while though)
SatanicPenguins
His code looks to be fine

My VB stopped working a while back, when i tried to run any code at all it would crash. Reinstalling it fixed it.

Dim Problem as Solved. (sorry, had to be done)

(just curious, does your vb crash when using Case's?)

Select Case Text1.text
Case "4"
Msgbox("hi")
End Select
mattcch2007
just a reminder
vb6 is a very old one, which runs more smoothly on win95/98 platforms.

SatanicPenguins
Visual basic 6 runs fine on XP?

6 is the last true visual basic in a sense, seeing as .Net is nothing at all like its predeccesors
Mezzo
VB6 Runs perfectly fine in XP (not sure about vista). I used to code in VB6 purely in XP (I've never tried it in 95/98.
Sonic
Thanks for the replies all ^^

I installed a visual basic service pack from the Microsoft site and this seems to have fixed the problem smile.gif
Mezzo
QUOTE(Sonic @ Jul 26 2007, 01:37 PM) *
Thanks for the replies all ^^

I installed a visual basic service pack from the Microsoft site and this seems to have fixed the problem smile.gif


Glad we could help Tip-Hat.gif And welcome to P2L. Hope you stay around. Theres not many questions in the Desktop Programming section ....We Need more!!
Sonic
smile.gif ill try to hang around, i have one more question also, which ill post xP
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.