Preselect the tag on the Month View sheet if there's only one.

This commit is contained in:
PhilRunninger 2024-03-15 13:17:09 -04:00
parent b10a3ac655
commit b73403aef7
6 changed files with 7 additions and 1 deletions

View File

@ -77,8 +77,14 @@ Private Sub butCancel_Click()
End Sub
Private Sub cbGoSheet_Click()
Dim tags
tags = RangeToArray(shConfig.ListObjects("TAGS").DataBodyRange)
If UBound(tags, 1) = 1 Then
shMonthView.Range("MonthTag").Value = tags(1, 1)
Else
shMonthView.Range("MonthTag").Value = ""
End If
shMonthView.Range("MonthComment").Value = ""
shMonthView.Range("MonthTag").Value = ""
shMonthView.Range("QtyPctChange").Value = 0
shMonthView.Range("PricePctChange").Value = 0
shMonthView.Visible = xlSheetVisible