|
-
Mar 30th, 2006, 10:21 AM
#1
Thread Starter
Addicted Member
Type Mismatch
in my module i have this sub
Public Sub dothis(tb As TextBox)
End Sub
now when i call this in any form using DoThis(aTextBox) it says "type mismatch"
secondly jus lyk there is a Forms collection using which i can iterate thru all open Forms, i want to know is there a collection regarding the Menu Items of an MDI Form. I want to disable them using something lyke this
dim mnu as Menu
For Each mnu in Menus
mnu.Enabled = false
Next
Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water
Huzefa Yousuf
Software Engineer
Verticity Inc.
+92-345-2235303
[email protected]
-
Mar 30th, 2006, 10:23 AM
#2
Re: Type Mismatch
If you use parentheses you need to use the Call keyword.If you are not using the Call keyword, then it is just
-
Mar 30th, 2006, 10:30 AM
#3
Thread Starter
Addicted Member
Re: Type Mismatch
gr8 ! wat abt my other question regarding accessing Menu Items of an MDI Form.
Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water
Huzefa Yousuf
Software Engineer
Verticity Inc.
+92-345-2235303
[email protected]
-
Mar 30th, 2006, 10:42 AM
#4
Addicted Member
Re: Type Mismatch
Don't think there is a menu collection. You could use the controls collection though:
VB Code:
Dim oCtrl As Control
For Each oCtrl In Me.Controls
If TypeName(oCtrl) = "Menu" Then
oCtrl.Enabled = False
End If
Next
Computer /nm./: a device designed to speed and automate errors
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
|