G
Guest
I have a userform with multiple (90) textboxes. The user enters data into some of them, and then that data is transferred to the spreadsheet. (The textboxes are not linked directly to cells). However, I do not want to transfer the data onto the spreadsheet for those textboxes that the user leaves empty. I have tried both of the following, but neither work.
For i = 1 To 90
Application.StatusBar = "Adding Data from Textbox" & i & " to spreadsheet."
ProgressPercent = Round(i / 90 * 100, 0)
fmProgress.pcProgress ProgressPercent
If Not IsEmpty(Controls("Textbox" & i).Value) Then
SheetToEnter.Cells(CurrentDateRow, ArrayOfColNums(i)) _
= Controls("Textbox" & i).Value
End If
Next i
and the same thing with IsNull in place of IsEmpty. I have also tried ">0" and "<> 0". Any ideas?
TIA
Marcotte
For i = 1 To 90
Application.StatusBar = "Adding Data from Textbox" & i & " to spreadsheet."
ProgressPercent = Round(i / 90 * 100, 0)
fmProgress.pcProgress ProgressPercent
If Not IsEmpty(Controls("Textbox" & i).Value) Then
SheetToEnter.Cells(CurrentDateRow, ArrayOfColNums(i)) _
= Controls("Textbox" & i).Value
End If
Next i
and the same thing with IsNull in place of IsEmpty. I have also tried ">0" and "<> 0". Any ideas?
TIA
Marcotte