Listview

A

adrian

Hi all,

Can anyone help?

I need to set the properties of a listview control so that
one column shows item numbers (1, 2, 3, ect)up to a pre-
stated number of items. with a corressponding column
allowing the user to enter a description of the item next
to the relevant item number.
The whole lot is then to be printed on a word doc.

I have not encountered this control before. Can anyone
assist?

Kind regards
Adrian
 
P

Peter Hewett

Hi Adrian

Is this a VB or a VBA project? I've tried a number of times to use the
ListView control in a VBA UserForm, and the best I can say about it is that
it works - sort of. Ultimately I abandoned the development of 2 projects
using the ListView control after a LOT of effort. It just does not seem to
work consistently as it does in VB.

Maybe you can find someone else that has had positive experience of it with
VBA Forms, but based on my experiences I can't recommend it.

You could just enter multiple lines of data in a multi-line TextBox control
and parse it out. Or you could label a limited number of TextBox fields and
have the user enter their data into each, this might be ok if there's not too
much data. You can get the Form to scroll if you need lots of controls.

You could add it line-by-line to a ListBox control maybe using a sub-Form -
but this is slow.

Good luck + Cheers - Peter
 
A

Adrian

Hi Peter,

Thank you for your advice.

Hmm tricky one. Probably most entries will number only 10
or so. But in theory, in rare instances 100 may be needed.
The thought of using 200 controls fills me with horror.
Hence the ListView approach.

I will see if anyone else has some ideas, failing
that..... its time to wear out the toolbox icons!!!

Cheers
Adrian
 
J

Jean-Guy Marcil

Hi Adrian,

As an alternative, especially considering you could get to 100..!

You could have a single button that would generate a temp doc consisting of
a locked form laid out as a two-column table and with a command button to
return to the code (And pick up the user data before destroying the temp doc
of course!).

Might be a bit more complicated to set up, but easier to maintain once you
have it running.

Just a thought!

--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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

Top