View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Minitman Minitman is offline
external usenet poster
 
Posts: 293
Default Combining TextBox Values With Spaces

Hey Bob,

Thanks for the reply.

At first I thought IIF was a typo! But then I check it out in msHelp
and found that it was not a typo, but a command I had never heard of!

It looks very interesting indeed.

As for the spacing problem, it was solved with Trim (see previous
posts).

I'm going to check out this IIF and see where it leads me.

Thank you for show me that command.

-Minitman

On Sun, 20 Jul 2008 12:27:04 +0100, "Bob Phillips"
wrote:

Dim i As Long

With Me
For i = 1 To 4
.TextBox5.Text = .TextBox5.Text & _
IIf(.Controls("TextBox" & i).Text < "", ._
Controls("TextBox" & i).Text, "") & _
IIf(i < 4, " ", "")
Next i
End With