CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2001
    Posts
    11

    How to enable / disable menu in forms through a function

    I have multiple forms with menus / sub-menus in them. Currently i have written
    seperate codes in each form for enabling / disabling the menus.

    Can someone help me in writing a function which takes form as input parameter and disable / enables the menu of that form.

    Thanks in advance.



  2. #2
    Join Date
    Mar 2001
    Location
    County Durham, England
    Posts
    238

    Re: How to enable / disable menu in forms through a function

    Hi there,

    This may help.Insert Below Sub into your Module

    Public Sub DisableMenu(Frm As Object)
    Frm.MenuName.Enabled = False
    End Sub


    Then just use 'Call DisableMenu(Form1)' to run the code on that Form.


    Work is necessary for man. Man invented the alarm clock.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured