diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 1dfa5887b27..f520b209a34 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -661,18 +661,23 @@ Public Class ucrDataView GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) Else Dim bCheckLabels As Boolean = GetCurrentDataFrameFocus().clsPrepareFunctions.CheckHasLabels(strColumn) - frmConvertToNumeric.SetDataFrameName(GetCurrentDataFrameFocus().strName) - frmConvertToNumeric.SetColumnName(strColumn) - frmConvertToNumeric.CheckLabels(bCheckLabels) - frmConvertToNumeric.SetNonNumeric(iNonNumericValues) - frmConvertToNumeric.ShowDialog() - ' Yes for "normal" convert and No for "ordinal" convert - If frmConvertToNumeric.DialogResult = DialogResult.Yes Then - GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) - ElseIf frmConvertToNumeric.DialogResult = DialogResult.No Then + If bCheckLabels Then + frmConvertToNumeric.SetDataFrameName(GetCurrentDataFrameFocus().strName) + frmConvertToNumeric.SetColumnName(strColumn) + frmConvertToNumeric.CheckLabels(bCheckLabels) + frmConvertToNumeric.SetNonNumeric(iNonNumericValues) + frmConvertToNumeric.ShowDialog() + ' Yes for "normal" convert and No for "ordinal" convert + Select Case frmConvertToNumeric.DialogResult + Case DialogResult.Yes + GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, True) + Case DialogResult.No + GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, False) + Case DialogResult.Cancel + Continue For + End Select + Else GetCurrentDataFrameFocus().clsPrepareFunctions.ConvertToNumeric(strColumn, False) - ElseIf frmConvertToNumeric.DialogResult = DialogResult.Cancel Then - Continue For End If frmConvertToNumeric.Close() End If