permite crear hojas de chequeo.
La inicial tiene un número de topics y de itemes por topic
Me gustaría que se pudieran aumentar el número de topic's, y que el número de item's por topic pudiera ser distinto.
El código inicial es :
Código:
Gracias Option Explicit Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ' Manage double clicking on the worksheet (used for changing the status of a check item or an entire topic) Dim blnIsTopic As Boolean On Error Resume Next ' User double clicked outside the checklist area - > exit sub If Application.Intersect(ActiveCell, Range("myCheckList")) = False Then Exit Sub ' Set boolean variable: true, if user double clicked on a topic (header) blnIsTopic = (InStr(ActiveCell.Offset(0, -(ActiveCell.Column - Range("myCheckList").Column)), C_SEPARATOR) = 0) And _ (ActiveCell.Offset(0, -(ActiveCell.Column - Range("myCheckList").Column)).Value <> "") If ActiveCell.Column = Range("myCheckList").Column + Range("myCheckList").Columns.Count - 1 Then ' User double clicked on a cell in the status column If ActiveCell.Value = C_DONE Then ' If status = done: status will be set to open ActiveCell.Value = C_OPEN ElseIf ActiveCell.Value = C_OPEN Or ActiveCell.Value = C_MIXED Then ' If status = open or mixed (topics only): status will be set to done ActiveCell.Value = C_DONE End If If blnIsTopic Then Call ChangeTopicStatus Else Call AutomaticSetTopicStatus End If ElseIf blnIsTopic Then ' User double clicked in a topic row and not on the status column -> expand or collapse the items of this topic Call ExpandCollapseItems End If End Sub