Solved

Creating Check Box in Excel VBA

Posted on 2014-04-24
1
478 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 51

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

691 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