command button as a toggle button 
Author Message
 command button as a toggle button

Hi,
    I need to use a command button as a toggle button. How can i do this.

--
Remember, we have not inherited this planet from our parents,
We have merely borrowed it from our children.
Save the earth while there is still time.

- Vijay



Fri, 13 Jun 2003 19:44:10 GMT  
 command button as a toggle button
You can use a checkbox with its style set to graphical.


Quote:
> Hi,
>     I need to use a command button as a toggle button. How can i do this.

> --
> Remember, we have not inherited this planet from our parents,
> We have merely borrowed it from our children.
> Save the earth while there is still time.

> - Vijay



Sat, 14 Jun 2003 00:09:59 GMT  
 command button as a toggle button
Vijay,

A toggle is essentially a switch that can remember its state.  You can use
its caption or its picture property or its color property or an external
variable etc to act as a simple memory for a toggle.  So you can write
something like this (may not be the best solution but it works - alas it
very quickly gets complicated.)

Sub Command1_Click()
If Command1.Caption="ON" then Command1.Caption="OFF" else
Command1.Caption="ON"
......(then do the instructions according to the state that it is in.)....

Another possible round about way is to have 2 CommandButtons overlying
eachother, one being visible the other invisible and when clicked the
visibility switches around.

They may not be the best solution - but an interesting lateral thinking
solution.

Regards,
George


Quote:
> Hi,
>     I need to use a command button as a toggle button. How can i do this.

> --
> Remember, we have not inherited this planet from our parents,
> We have merely borrowed it from our children.
> Save the earth while there is still time.

> - Vijay



Mon, 16 Jun 2003 23:35:23 GMT  
 command button as a toggle button
use my free ActiveX (with source)

http://fred.just.free.fr/english/activex/switch.html

--
Fred Just

Active Visual Basic
http://www.fredjust.com


Quote:
> Hi,
>     I need to use a command button as a toggle button. How can i do this.

> --
> Remember, we have not inherited this planet from our parents,
> We have merely borrowed it from our children.
> Save the earth while there is still time.

> - Vijay



Wed, 06 Aug 2003 06:56:41 GMT  
 command button as a toggle button
Try using check box with style property set to graphical.


Thu, 07 Aug 2003 09:35:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Toggle Button Effect on Tollbar Button

2. Toggle Button Effect on Toolbar Button

3. buttons, toggle button, sliders...

4. Toggling command button caption using altercaption - newbie

5. Hover Button style command buttons in Access 97?

6. Using WhatsThisMode on command button activates button click procedure

7. Is there a drop down regular command button, not active buttons

8. Toggle Button Property

9. MS-Access question on toggle button

10. Powerpoint/Vba -Embedding Images In Toggle Buttons?

11. toggle button problem

12. How to specify the state of a toggle button

 

 
Powered by phpBB® Forum Software