Solved

Creating Check Box in Excel VBA

Posted on 2014-04-24
1
469 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 48

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now