0

Ok i have a button on MDI parent form and i need to disable it when closing a child form. When writing the button name (cmdmenu) in the child form, it says that the cmdmenu is not declared please help

2
Contributors
3
Replies
5
Views
7 Years
Discussion Span
Last Post by manutd4life
0

That button should be publicaly decalred.
if it is publically availabele then
in child form closing event

Mdiform.cmdmenu.disabled=true

Edited by happygeek: fixed formatting

0

Got it i solved it
Here's the code

Dim par As frmMainmenu = Me.MdiParent
        par.cmdmenu.Enabled = False

no need to declare it in module, it works great

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.