ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   q: is this possible in vba - multiple command buttons.. (https://www.excelbanter.com/excel-programming/385204-q-possible-vba-multiple-command-buttons.html)

Clinton M James[_2_]

q: is this possible in vba - multiple command buttons..
 
Hey Folks,

I have a userform which as a series of three checkboxes per line. Beside
these checkboxes, I have a command button - the reason is so the use can
hit the button to flag on or off the checkboxes in the row to which it
corresponds rather than individually ticking each one, if all apply.

A graphical way it as such: Where @ is the command button and * is the check
box

@ * * *
@ * * *
@ * * *
etc

Rather than programming 25 subprograms... one for each command button, is it
possible to have one sub or function to cater to the overall workings?

If not... is it possible to return the values of relevant regions that the
mouse button is clicked on on the userform? This way i can draw on the
userform or place images and just have it determine the userform was clicked
on and work out where it was clicked as a defactocommand button.

Help is greatly appreciated. Thank You In Advance.



Charles Chickering

q: is this possible in vba - multiple command buttons..
 
Clinton, check out this site from J-Walk. I think it is exactly what you're
looking for:
http://www.j-walk.com/ss/excel/tips/tip44.htm
--
Charles Chickering

"A good example is twice the value of good advice."


"Clinton M James" wrote:

Hey Folks,

I have a userform which as a series of three checkboxes per line. Beside
these checkboxes, I have a command button - the reason is so the use can
hit the button to flag on or off the checkboxes in the row to which it
corresponds rather than individually ticking each one, if all apply.

A graphical way it as such: Where @ is the command button and * is the check
box

@ * * *
@ * * *
@ * * *
etc

Rather than programming 25 subprograms... one for each command button, is it
possible to have one sub or function to cater to the overall workings?

If not... is it possible to return the values of relevant regions that the
mouse button is clicked on on the userform? This way i can draw on the
userform or place images and just have it determine the userform was clicked
on and work out where it was clicked as a defactocommand button.

Help is greatly appreciated. Thank You In Advance.





All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com