Solved

Creating Check Box in Excel VBA

Posted on 2014-04-24
1
475 Views
Last Modified: 2014-04-25
Say, Please give detailed steps for the above in Excel 2013.
How can I test the state of the check box using VBA code?
How can I ensure that the last state is recalled when opening excel?
Tx
0
Comment
Question by:shaunwingin
1 Comment
 
LVL 50

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40021958
Hi,

You could insert form the Developer's tab / Controls / Insert / Form Controls a checkbox

and use this code

Sub Macro()
'
'True = 1 and False = -4146

Result = ActiveSheet.Shapes("Check Box 1").OLEFormat.Object.Value
End Sub

Open in new window

Regards
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

749 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