Solved

How disable or remove a menu option at run time?

Posted on 2001-08-07
4
148 Views
Last Modified: 2010-05-02
Basics:  VB6 sp5 on Windows NT.

Question:  Based on certain conditions I want to disable or even eliminate some menu options.  How can that be done?

Thanks.
0
Comment
Question by:EYoung
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
JonFish85 earned 25 total points
ID: 6362043
MyMenuName.Enabled = False

or

MyMenuName.Visible = False

use it just like you would for a regular button...
0
 
LVL 3

Expert Comment

by:andysalih
ID: 6362062
also to add to johns comment,

if you want to disable buttons or labels or text on your menu.

then

command1.enable=false

or what ever the button is called

cheers
Andy
0
 
LVL 7

Author Comment

by:EYoung
ID: 6362086
Yes, that is what I have been looking for.  Thanks to both of you.

I have another question that I am not getting far on.  Could you two look at it?  Thanks.  It is:

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?qid=20164266

Regards,
EYoung
0
 
LVL 6

Expert Comment

by:JonFish85
ID: 6362104
glad I could help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use closed file on desktop in vba 6 65
Updates not working for MS Windows 7 12 152
VBA Shell can't Find Word document 11 73
MS Access 03, TransferText, decimal places 8 35
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now