|
-
Apr 19th, 2000, 08:35 PM
#1
Thread Starter
Hyperactive Member
Where am I going wrong? I want bool to pass to sub but I get a "by refrence type mismatch" error.Here's the code:
Public bool as boolean
Private Sub Option1_Click(index As Integer)
If index = 0 Then
Call Pass(bool)
If bool = True Then
frmbool.Show
End If
End If
If index = 1 Then
Call Pass(bool)
If bool = True Then
frmNew.Show
End If
End If
End Sub
Public Sub Pass(bool As Boolean)
If InputBox("Please Enter Your Password") = "password" Then
bool = True
Unload Me
Else
Exit Sub 'Form_Load
End If
End Sub
-
Apr 19th, 2000, 08:42 PM
#2
Fanatic Member
if bool is public then why do you need to pass it to the sub? you can assign it a value any where.
Iain, thats with an i by the way!
-
Apr 19th, 2000, 08:50 PM
#3
Lively Member
I ran your code and it worked fine for me.
-
Apr 19th, 2000, 08:56 PM
#4
Fanatic Member
Just tries running the code as well. Works fine.
Iain, thats with an i by the way!
-
Apr 19th, 2000, 09:32 PM
#5
transcendental analytic
I would use a function instead of sub
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
|