[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how can I make a button greyout in dynamics

Posted on 2011-02-17
6
Medium Priority
?
954 Views
Last Modified: 2012-05-11
I would like to be able to check if a button is greyout and also make a button greyout for some requirement that I have in my vba.
how can I accomplish this? like in the picture attached
thanks
0
Comment
Question by:taverny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Accepted Solution

by:
VBClassicGuy earned 1200 total points
ID: 34919447
In VB6 (which you probably convert into VBA):

If cmdButon.Enabled Then
   'button is not grayed out
Else
   'button is grayed out
End If

To gray out:

cmdButton.Enabled = False
0
 
LVL 1

Assisted Solution

by:bsardeson
bsardeson earned 800 total points
ID: 34920082
I agree with VBClassicGuy

type "enabled" in your code and hit f1 to see the VB Help File for .Enabled for further details and explicit example.
0
 

Author Comment

by:taverny
ID: 34922145
Thanks for your input.
button.enabled works but doesn't make it gray out. it just make it not clickable. I wanted it more like the picture below:
button.JPG
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 1

Expert Comment

by:bsardeson
ID: 34923553
look at the other appearance properties then ... something isn't right, it should grey-out.  Can you send us a pic of your button with the button.enable = false please.  I'll look further into it in the morning, I don't have VB at home.
0
 

Author Comment

by:taverny
ID: 34928463
I am sorry , it does work my code was written in the wrong procedure so it was not showing .
Thanks
0
 
LVL 1

Expert Comment

by:bsardeson
ID: 34930834
LOL, story of our lives buddy!
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
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…
Suggested Courses

650 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