textbox issue

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

I have a userform with 30 textboxes to allow the user to enter data.
This data is then copied to a worksheet. During usage they may need
to leave some or all textboxes blank. This has the result of empty
text strings "" being copied to my worksheet. This screws up some
isblank and countif functions.

Is there a way to set the empty textbox to "blank" ? Failing that
what is the easiest way to find and delete empty text strings in a
row? Find doesn't find them.

Thanks for your help.
 
Test the length

If Len(Textbox1.Text) > 0 Then
Worksheets(1).Range("A1").Value = Textbox1.Text
End If
 
Assuming you have a command button to trigger the population of the
spreadsheet you could loop through each textbox control on the form and if
it's blank alterthe value to the text "blank" or whatever you want.

--
If I've mis-understood the question please tell me.

HTH

ijb

Remove nospam from my e-mail address to talk direct

Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top