Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CheckBox open File
Hi Bob, Thanks for that code, but in the sheet I don't want use any checkboxe . I am trying to make it as user friendly as possible for other user. Lenny Bob Phillips Wrote: Lenny, Rather than checkboxes, you could use a format, and put the label in 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 ha 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 -- 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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CheckBox open File
Lenny,
This doesn;t use checknboxes, but it allows your user to select/deselect a cell. You can put a caption in an adjacent cell and change it as you wanted. You can then check if a cell is selected (=IF(A1="a", ...) and take action. -- HTH RP (remove nothere from the email address if mailing direct) "Lenny_821" wrote in message ... Hi Bob, Thanks for that code, but in the sheet I don't want use any checkboxes I am trying to make it as user friendly as possible for other user. Lenny Bob Phillips Wrote: 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 -- 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checkbox - Output results to a csv file | Excel Worksheet Functions | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Excel Discussion (Misc queries) | |||
Checkbox to open another worksheet | Excel Discussion (Misc queries) | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
CheckBox open File | Excel Programming |