Solved

Disable the cmdbutton index?

Posted on 2009-04-10
2
175 Views
Last Modified: 2013-11-25
How to disable the cmdbutton index?
i have a command buttond name cmdbase as index from 1 to 6. I want to disable it using the code.
It doesn't work...Please help Thanks

Private sub disable()
cmdbase(index, 0, 6).enable = False
end sub
0
Comment
Question by:Whing Dela Cruz
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 24115177
you have to loop through them:

for i = 0 to 6
   cmdbase(i).enabled = false
next
0
 

Author Comment

by:Whing Dela Cruz
ID: 24115233
Thanks so much to you the code is working...
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 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