ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA for InputBox-Like CheckBox (https://www.excelbanter.com/excel-programming/423046-vba-inputbox-like-checkbox.html)

Rob

VBA for InputBox-Like CheckBox
 
I was wondering if there is a way to call for a Check Box via VBA just like
you can call a InputBox?

Instead of -- WhatAnswer = Inputbox (Input Your Answer)

Maybe WhatAnswer = CheckBox ()???


I have a feeling the answer is no but can someone make it official or
describe how I can do this?


Thanks Much,
Rob

JLGWhiz

VBA for InputBox-Like CheckBox
 
OK, Rob, the answer is NO. However, you can put a checkbox on a userform
with its associated code and then call the userform when needed. You can
also write a separate sub routine that adds a checkbox, names it and ties it
to associated code. In my view the userform is the easiest.

"Rob" wrote:

I was wondering if there is a way to call for a Check Box via VBA just like
you can call a InputBox?

Instead of -- WhatAnswer = Inputbox (Input Your Answer)

Maybe WhatAnswer = CheckBox ()???


I have a feeling the answer is no but can someone make it official or
describe how I can do this?


Thanks Much,
Rob


Dave Peterson

VBA for InputBox-Like CheckBox
 
I'm not sure what you're doing, but maybe you could use a msgbox and just ask a
yes/no question????

Rob wrote:

I was wondering if there is a way to call for a Check Box via VBA just like
you can call a InputBox?

Instead of -- WhatAnswer = Inputbox (Input Your Answer)

Maybe WhatAnswer = CheckBox ()???

I have a feeling the answer is no but can someone make it official or
describe how I can do this?

Thanks Much,
Rob


--

Dave Peterson

Rob

VBA for InputBox-Like CheckBox
 
That just happens to be exactly what I ended up resorting to. I just wished
there was a way to customize the text that shows up on the MsgBox Buttons. :?

Rob



"Dave Peterson" wrote:

I'm not sure what you're doing, but maybe you could use a msgbox and just ask a
yes/no question????

Rob wrote:

I was wondering if there is a way to call for a Check Box via VBA just like
you can call a InputBox?

Instead of -- WhatAnswer = Inputbox (Input Your Answer)

Maybe WhatAnswer = CheckBox ()???

I have a feeling the answer is no but can someone make it official or
describe how I can do this?

Thanks Much,
Rob


--

Dave Peterson


Rob

VBA for InputBox-Like CheckBox
 
Thanks JWhiz. I ended up using a MsgBox instead but I am, however,
interested on what you mean by...

"You can also write a separate sub routine that adds a checkbox, names it
and ties it to associated code."

That sounds interesting and fun. Where can I go to get some sample code for
that?


Cheers!



"JLGWhiz" wrote:

OK, Rob, the answer is NO. However, you can put a checkbox on a userform
with its associated code and then call the userform when needed. You can
also write a separate sub routine that adds a checkbox, names it and ties it
to associated code. In my view the userform is the easiest.

"Rob" wrote:

I was wondering if there is a way to call for a Check Box via VBA just like
you can call a InputBox?

Instead of -- WhatAnswer = Inputbox (Input Your Answer)

Maybe WhatAnswer = CheckBox ()???


I have a feeling the answer is no but can someone make it official or
describe how I can do this?


Thanks Much,
Rob


Dave Peterson

VBA for InputBox-Like CheckBox
 
You can design your own userform and make anything you like.

Rob wrote:

That just happens to be exactly what I ended up resorting to. I just wished
there was a way to customize the text that shows up on the MsgBox Buttons. :?

Rob

"Dave Peterson" wrote:

I'm not sure what you're doing, but maybe you could use a msgbox and just ask a
yes/no question????

Rob wrote:

I was wondering if there is a way to call for a Check Box via VBA just like
you can call a InputBox?

Instead of -- WhatAnswer = Inputbox (Input Your Answer)

Maybe WhatAnswer = CheckBox ()???

I have a feeling the answer is no but can someone make it official or
describe how I can do this?

Thanks Much,
Rob


--

Dave Peterson


--

Dave Peterson


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

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