Link to home
Create AccountLog in
Avatar of Jack_Jones
Jack_Jones

asked on

Visual Basic ListView

Is it possible to set format to the different colums, for example $ & % values?

Here is what I have that is working, just need to format the colums. This takes data from an excel sheet, but only gives the values and no formatting. Thanks

ListView1.Items.Add(oSheet.Range("A3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("D3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("F3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("G3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("I3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("N3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("R3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("V3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("Y3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("Z3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("AA3").Value)

Open in new window

Avatar of Deepak Lakkad
Deepak Lakkad
Flag of India image

are you displaying data in tabular format ?

If yes, I think DataGridView will be a good option rather then Listview.
Avatar of Jack_Jones
Jack_Jones

ASKER

Well I couldn't get a datagridview to work ;(, but got the listview to work good.
Would I just hide the table, and just impliment a datagridview to pickup the items?
what is your requirement?
ASKER CERTIFIED SOLUTION
Avatar of MTroutwine
MTroutwine
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
MTroutwine,

 I found the excel method on here under searching solutions. So I am really limited on how else to do it.
So there is no way to do this?
Thanks