Thread: Textboxes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default Textboxes

Marcotte,

If Controls("Textbox" & i).Value < "" Then

hth,

Doug Glancy

"Marcotte A" wrote in message
...
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