If no history, hide form before showing message.
This commit is contained in:
parent
395da4671b
commit
7bd8cc2674
@ -15,6 +15,20 @@ Attribute VB_PredeclaredId = True
|
|||||||
Attribute VB_Exposed = False
|
Attribute VB_Exposed = False
|
||||||
Private X As Variant
|
Private X As Variant
|
||||||
|
|
||||||
|
Private Sub UserForm_Activate()
|
||||||
|
tbPrint.Value = ""
|
||||||
|
|
||||||
|
Dim fail As Boolean
|
||||||
|
X = handler.list_changes("{""scenario"":{""quota_rep_descr"":""" & shData.Cells(2, 5) & """}}", fail)
|
||||||
|
If fail Then
|
||||||
|
Unload Me
|
||||||
|
MsgBox ("No adjustments have been made.")
|
||||||
|
End
|
||||||
|
End If
|
||||||
|
Me.lbHist.list = X
|
||||||
|
Call Utils.frmListBoxHeader(Me.lbHEAD, Me.lbHist, "Modifier", "Owner", "When", "Tag", "Comment", "Sales", "id")
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub cbCancel_Click()
|
Private Sub cbCancel_Click()
|
||||||
Me.Hide
|
Me.Hide
|
||||||
End Sub
|
End Sub
|
||||||
@ -34,25 +48,13 @@ Private Sub lbHist_Change()
|
|||||||
Next i
|
Next i
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UserForm_Activate()
|
|
||||||
Dim fail As Boolean
|
|
||||||
|
|
||||||
X = handler.list_changes("{""scenario"":{""quota_rep_descr"":""" & shData.Cells(2, 5) & """}}", fail)
|
|
||||||
If fail Then
|
|
||||||
Me.Hide
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
Me.lbHist.list = X
|
|
||||||
Call Utils.frmListBoxHeader(Me.lbHEAD, Me.lbHist, "Modifier", "Owner", "When", "Tag", "Comment", "Sales", "id")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Sub delete_selected()
|
Sub delete_selected()
|
||||||
Dim logid As Integer
|
Dim logid As Integer
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
Dim fail As Boolean
|
Dim fail As Boolean
|
||||||
Dim proceed As Boolean
|
Dim proceed As Boolean
|
||||||
|
|
||||||
If MsgBox("Permanently delete these changes?", vbOKCancel) = vbCancel Then
|
If MsgBox("Permanently delete these changes?", vbYesNo) = vbNo Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user