Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm having a bit of trouble getting started populating a ListView control placed on an Excel worksheet. I'm using the Microsoft ListView Control, Version 6.0. I have Excel 2003 SP2. I've already used the same control in a form in VB 6 with no problem. My code for setting up multiple column headers, enabling gridlines, and adding rows of data isn't quite taking. The same code in VB 6 is not working in VBA and I'm just looking for a little starter help to get me going. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Seeing some code would help to help. "Not working" is meaningless -unless
someone big wants his money back.. Best wishes Harald "RLang" wrote in message ... Hi, I'm having a bit of trouble getting started populating a ListView control placed on an Excel worksheet. I'm using the Microsoft ListView Control, Version 6.0. I have Excel 2003 SP2. I've already used the same control in a form in VB 6 with no problem. My code for setting up multiple column headers, enabling gridlines, and adding rows of data isn't quite taking. The same code in VB 6 is not working in VBA and I'm just looking for a little starter help to get me going. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Harald, starting off simple, I'm expecting the code below to create three
columns with headers and one data line entry. This code is identical to what I'm using in VB 6.0 to use the ListView control. The control is embedded on the worksheet ("start") surface and is named ListView1. Right now only one column appears with the "Rec" header title and then empty data records follow with gridlines. Sub CommandButton4_Click() Dim itmX Sheets("start").ListView1.ListItems.Clear Sheets("Start").ListView1.ColumnHeaders.Add , , "Rec", Sheets("Start").ListView1.Width * (3 / 5) Sheets("Start").ListView1.ColumnHeaders.Add , , "Date/Time", Sheets("Start").ListView1.Width * (1 / 5) Sheets("Start").ListView1.ColumnHeaders.Add , , "Prod ID", Sheets("Start").ListView1.Width * (1 / 5) Set itmX = Sheets("start").ListView1.ListItems.Add() itmX.Text = "1234" itmX.SubItems(1) = "1/1/2008" itmX.SubItems(2) = "890" End Sub "Harald Staff" wrote: Seeing some code would help to help. "Not working" is meaningless -unless someone big wants his money back.. Best wishes Harald "RLang" wrote in message ... Hi, I'm having a bit of trouble getting started populating a ListView control placed on an Excel worksheet. I'm using the Microsoft ListView Control, Version 6.0. I have Excel 2003 SP2. I've already used the same control in a form in VB 6 with no problem. My code for setting up multiple column headers, enabling gridlines, and adding rows of data isn't quite taking. The same code in VB 6 is not working in VBA and I'm just looking for a little starter help to get me going. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nevermind, I think I've got her working now.
"RLang" wrote: Hi Harald, starting off simple, I'm expecting the code below to create three columns with headers and one data line entry. This code is identical to what I'm using in VB 6.0 to use the ListView control. The control is embedded on the worksheet ("start") surface and is named ListView1. Right now only one column appears with the "Rec" header title and then empty data records follow with gridlines. Sub CommandButton4_Click() Dim itmX Sheets("start").ListView1.ListItems.Clear Sheets("Start").ListView1.ColumnHeaders.Add , , "Rec", Sheets("Start").ListView1.Width * (3 / 5) Sheets("Start").ListView1.ColumnHeaders.Add , , "Date/Time", Sheets("Start").ListView1.Width * (1 / 5) Sheets("Start").ListView1.ColumnHeaders.Add , , "Prod ID", Sheets("Start").ListView1.Width * (1 / 5) Set itmX = Sheets("start").ListView1.ListItems.Add() itmX.Text = "1234" itmX.SubItems(1) = "1/1/2008" itmX.SubItems(2) = "890" End Sub "Harald Staff" wrote: Seeing some code would help to help. "Not working" is meaningless -unless someone big wants his money back.. Best wishes Harald "RLang" wrote in message ... Hi, I'm having a bit of trouble getting started populating a ListView control placed on an Excel worksheet. I'm using the Microsoft ListView Control, Version 6.0. I have Excel 2003 SP2. I've already used the same control in a form in VB 6 with no problem. My code for setting up multiple column headers, enabling gridlines, and adding rows of data isn't quite taking. The same code in VB 6 is not working in VBA and I'm just looking for a little starter help to get me going. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ListView control in Excel 2007 jumps! | Excel Programming | |||
Why does Listview control shift to top on multi-page form? | Excel Programming | |||
Images cannot be assigned to Listview control | Excel Programming | |||
How to add icons in the Listview control | Excel Programming | |||
How to use Listview control | Excel Programming |