diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index 41d664b..5aca9bc 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -1770,15 +1770,32 @@ Public Class frmValidator Else wertWD = aktivesDokument.GetVariableValue(idxname) End If + If wertWD Is Nothing Then + If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {idxname}: Nothing", False) If defaultValue = String.Empty Then + If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert-defaultValue wurde nicht gefunden", False) cmb.SelectedIndex = -1 Else + If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert-defaultValue wird geladen", False) cmb.Text = defaultValue 'cmb.SelectedIndex = cmb.FindStringExact(defaultValue) End If Else - cmb.SelectedIndex = cmb.FindStringExact(wertWD) + If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {idxname}: {wertWD}", False) + If LogErrorsOnly = False Then ClassLogger.Add($" >> Items in Combobox: {cmb.Items.Count}", False) + + + If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde gesetzt", False) + cmb.Text = wertWD + + 'If cmb.Items.Count = 0 Then + ' If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde gesetzt", False) + ' cmb.Text = wertWD + 'Else + ' If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde ausgewählt", False) + ' cmb.SelectedIndex = cmb.FindStringExact(wertWD) + 'End If End If End If Case "System.Windows.Forms.DataGridView"