ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CheckBox open File (https://www.excelbanter.com/excel-programming/317071-checkbox-open-file.html)

Lenny_821[_5_]

CheckBox open File
 

Hi all,

I've got over 20 checkboxes, which can change from month to month.

Is it possible to have the caption linked to a cell? Becasue, let
say, if the name's have to change I can just do that in an exce
sheet.
Also, how can I check with a quick vba code which one's are "true".

What I want to do is to open those excel files which the user has pu
the checkbox on "true".

So, if you got a solution for me, that will be great.

Lenn

--
Lenny_82
-----------------------------------------------------------------------
Lenny_821's Profile: http://www.excelforum.com/member.php...fo&userid=1517
View this thread: http://www.excelforum.com/showthread.php?threadid=31425


Bob Phillips[_6_]

CheckBox open File
 
Lenny,

Rather than checkboxes, you could use a format, and put the label in a cell.
You can count them with

=COUNTIF(A:A,"a")

This is the code to maintain it

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
End If
.Offset(0, 1).Select
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lenny_821" wrote in message
...

Hi all,

I've got over 20 checkboxes, which can change from month to month.

Is it possible to have the caption linked to a cell? Becasue, lets
say, if the name's have to change I can just do that in an excel
sheet.
Also, how can I check with a quick vba code which one's are "true".

What I want to do is to open those excel files which the user has put
the checkbox on "true".

So, if you got a solution for me, that will be great.

Lenny


--
Lenny_821
------------------------------------------------------------------------
Lenny_821's Profile:

http://www.excelforum.com/member.php...o&userid=15179
View this thread: http://www.excelforum.com/showthread...hreadid=314250





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

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