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

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


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