Solved

Creating Check Box in Excel VBA

Posted on 2014-04-24
1
473 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 49

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

770 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