Michał Masny
Michał Masny

Reputation: 229

Compile errors in Visual Basic 6.0 in a one-line tutorial program

I've just installed MS Visual Basic 6.0 on my computer, and I'm trying to figure out what it's about. I've found this tutorial. Example 2.1.1 is

 Private Sub Form_Load ( )

 Form1.show

 Print “Welcome to Visual Basic tutorial”

 End Sub

I've pasted this where they say I should, pressed F5, and I'm getting error messages.

When I first press F5, I get this:

enter image description here

I click OK and press F5 again. Then I get a different message:

enter image description here

What's going on?

Upvotes: 0

Views: 1641

Answers (1)

Majid Laissi
Majid Laissi

Reputation: 19808

It's a copy-past problem:

Print “Welcome to Visual Basic tutorial”

SHould be:

Print "Welcome to Visual Basic tutorial"   

(normal double quotes)

Upvotes: 7

Related Questions