All pastes #929326 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-03-05 18:06 UTC
rendered paste body
Private Sub cmdDelTask_Click()
    ' This works, except for registry string removal
    Dim strMessage As String, strTitle As String
    Dim strResult As String
    
    strMessage = "Are you sure you want to delete this task? This will also remove it from the main task list."
    strTitle = "Task Removal"
    
    strResult = MsgBox(strMessage, vbYesNo, strTitle)
    
    If strResult = "6" Then
        lstToDo.RemoveItem lstToDo.ListIndex       ' Remove Item Highlighted
        DeleteValue HKEY_LOCAL_MACHINE, "SOFTWARE\D-Code Software\Taskmaster Server\Tasks", "Task" & lstToDo.ListIndex
    Else
        Exit Sub
    End If
End Sub