View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JustLearning JustLearning is offline
external usenet poster
 
Posts: 16
Default Spacing in a listbox

It works but still it does not solve the problem:
I have found that if I use a word smaller than 8 characters and a word
longer than 13 characters this happens:

St Annes 2007/02/17
St Augustine 2007/02/17

But if i count the char and use an if statement that states if the char < 8
then using two vbtabs or else only one vbtab then i get

St Annes 2007/02/17
St Augustine 2007/02/17
But this if statement effects the 3,4,5 columns and messes the columns up
again


"Bob Phillips" wrote:

With Me.ListBox1
For Each c In Range("A1:A10")
For i = 0 To 2
tmp = tmp & c.Offset(0, i).Value & vbTab
Next i
.AddItem tmp
Next c
End With


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JustLearning" wrote in message
...
I have a listbox which I ad data to with listbox.additem "" &
c.offset(0,-1)
& ......
But some cells has longer names in them and thus I cannot seem to list
them
neatly next to each other for example:

Appels 1000 Bear
Apricot-jam 30 Impala

How can i get the spacing correct?

Any help will do
Thanks