User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 397,771 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,518 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 3682 | Replies: 3
Reply
Join Date: Jan 2005
Location: Hollywood, MD
Posts: 66
Reputation: Kiba Ookami is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
Kiba Ookami's Avatar
Kiba Ookami Kiba Ookami is offline Offline
Junior Poster in Training

Command Button Validation

  #1  
Feb 18th, 2005
Hello all! I'm a year one programming student who is currently finishing up his first year, and heading into AP! We only really work with VB in our corse, and we're not moving too fast, so I had a question I'd hope was answerable. Is it possable to cause a command button to become invalid, that is, grey it out so that the button cannot be used until a certian value = true?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2005
Location: Hollywood, MD
Posts: 66
Reputation: Kiba Ookami is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
Kiba Ookami's Avatar
Kiba Ookami Kiba Ookami is offline Offline
Junior Poster in Training

Re: Command Button Validation

  #2  
Feb 18th, 2005
Accually I guess you can go on and deleat this, I found a way to use it doing the cmdButton.Visible command--unless theres another way to go about what I was after, that is.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Command Button Validation

  #3  
Feb 18th, 2005
command1.enabled = false ?
Reply With Quote  
Join Date: Feb 2005
Location: London, UK
Posts: 236
Reputation: uniquestar is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 11
uniquestar's Avatar
uniquestar uniquestar is offline Offline
Daniweb Sponsor

Re: Command Button Validation

  #4  
Feb 25th, 2005
I agree with comatose, in the properties window of the command button there is a property name "Enabled" set this to what you want the button on startup, and then when in the form the code you need, as stated above is simply command1.enabled = false, then you will still see the command button but it will be "greyed out" as you put it.
hope this helps.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 4:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC