Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Compare 2 Listviews And Copy Listview Content To Another Listview?


Hi all. I am filling a listview with xml data as shown in code beleow. I am calling this part using timer.What i want at the end of this code to compare listview1 with listview2. If they are diffrent or if listview2 is empty then i copy content of listview1 to listview 2.Otherwise do nothing. could any one show me how i can make such compare an copy?Thanks


1 Code:
Dim objDoc As MSXML2.DOMDocument
Dim objNodelist As IXMLDOMNodeList
Dim objNode As IXMLDOMNode
Dim lvwItem As ListItem


    'load the xml document
    Set objDoc = New MSXML2.DOMDocument
    objDoc.async = False
    objDoc.Load "http://localhost/data.php"
   
    'add all the song nodes into a  nodelist
    Set objNodelist = objDoc.selectNodes("//song")
   
    'Clear the listview
    ListView1.ListItems.Clear

    'Loop through each song node and add to the list view
    For Each objNode In objNodelist
        Set lvwItem = ListView1.ListItems.Add(, , objNode.selectSingleNode("artist").Text)
        lvwItem.SubItems(1) = objNode.selectSingleNode("name").Text
        lvwItem.SubItems(2) = objNode.selectSingleNode("image").Text
        lvwItem.SubItems(3) = objNode.selectSingleNode("rating").Text
        lvwItem.SubItems(4) = objNode.selectSingleNode("songid").Text
        lvwItem.SubItems(5) = objNode.selectSingleNode("totalvotes").Text

    Next objNode

''Here i want to compare listview1 with listview2. If it is empty or diffrent if fill it
otherwise i do nothing.

Set lvwItem = Nothing
    Set objNodelist = Nothing
    Set objDoc = Nothing




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Compare 2 Listviews And Copy Listview Content To Another Listvi
Hi all. I am filling a listview with xml data as shown in code beleow. I am calling this part using timer.What i want at the end of this code to compare listview1 with listview2. If they are diffrent or if listview2 is empty then  i copy content of listview1 to listview 2.Otherwise do nothing. could any one show me how i can make such compare an copy?Thanks

CODEDim objDoc As MSXML2.DOMDocument
Dim objNodelist As IXMLDOMNodeList
Dim objNode As IXMLDOMNode
Dim lvwItem As ListItem


    'load the xml document
    Set objDoc = New MSXML2.DOMDocument
    objDoc.async = False
    objDoc.Load "http://localhost/data.php"
    
    'add all the song nodes into a  nodelist
    Set objNodelist = objDoc.selectNodes("//song")
    
    'Clear the listview
    ListView1.ListItems.Clear

    'Loop through each song node and add to the list view
    For Each objNode In objNodelist
        Set lvwItem = ListView1.ListItems.Add(, , objNode.selectSingleNode("artist").Text)
        lvwItem.SubItems(1) = objNode.selectSingleNode("name").Text
        lvwItem.SubItems(2) = objNode.selectSingleNode("image").Text
        lvwItem.SubItems(3) = objNode.selectSingleNode("rating").Text
        lvwItem.SubItems(4) = objNode.selectSingleNode("songid").Text
        lvwItem.SubItems(5) = objNode.selectSingleNode("totalvotes").Text

    Next objNode

''Here i want to compare listview1 with listview2. If it is empty or diffrent if fill it
otherwise i do nothing.
Set lvwItem = Nothing
    Set objNodelist = Nothing
    Set objDoc = Nothing

How To Compare 2 Listview Content?
Hi all. I have 2 listview . I wonder how i can check these 2 listview content if they are the same or not. could any one show me how check content of 2 listview if they are the same or not.Thanks

Mapping In ListView Boxes:Automatically Using 3 Listviews
basically, I'am having data loaded into two listviews.
I want the 3rd listview to contain the matches from the other listviews boxes.

Sorry for all the code...just wanting to be thorough....

What I have:
vb6 sp5
2 Listboxes-show excel sheet names

2 ListViews- show column headers in excel sheet
1 ListView shows the mapping from lvwSource to lvwDest
commondialog1
1 command button- to APPEND Data
Source excel file
Destination Excel file


Load Excel files:
Using commondialog to choose a Source/Destination Excel files
After I choose a sheet , the columns come up in the Source ListView.
After I choose a Dest sheet the Columns come up in another Target ListView.

What Iam doing:
Mapping Excel fields in ListViews and appending data based on column mappings.

reference question
http://www.experts-exchange.com/Prog..._20610030.html


Method: Drag and Drop:
I'am dragging fields from Source listView To Target Listview..
3 rd Listview shows the column Mappings.

I press a command button to append data from source excel to target excel. Based on drag and drop field mappings.


What I need:
I would like to have another command button that will AutoMap the Source Columns to Target Columns
and present them in the 3rdListview automatically.... instead of drag and drop. if I choose.


here is the code for drag and drop..

' ====== start code ==============


Public EFile, xlFile, dbTablename1, oSource, oDest, CF
Private Sub cmdAppend_Click()
Dim lastSourceRow As Long
Dim lastDestRow As Long

lastSourceRow = oSource.SHeets(List1.Text).UsedRange.Rows.Count
lastDestRow = oDest.SHeets(List4.Text).UsedRange.Rows.Count
ReDim Copycells(lastSourceRow - 1) As Variant
Dim less As String
For x = 1 To lvwMap.ListItems.Count
Sourcecolumn = CInt(lvwMap.ListItems.Item(x).SubItems(1))
SourceDest = CInt(lvwMap.ListItems.Item(x).SubItems(3))
'Copy source cells into array then array into destination cells
Copycells = oSource.SHeets(List1.Text).range(oSource.workbooks(1).SHeets(List1.Tex t).Cells(2, CInt(Sourcecolumn)), oSource.workbooks(1).SHeets(List1.Text).Cells(CInt(lastSourceRow), CInt(Sourcecolumn))).Value
oDest.SHeets(List4.Text).range(oDest.workbooks(1).SHeets(List4.Text).C ells(lastDestRow + 1, CInt(SourceDest)), oDest.workbooks(1).SHeets(List4.Text).Cells((lastSourceRow + lastDestRow) - 1, CInt(SourceDest))).Value = Copycells
Next x
MsgBox "Sheet Appending is Done"
End Sub

Private Sub cmdSourceExcel_Click()

CommonDialog1.Filter = "MS Excel Files(*.xls)|*.xls|All Files(*.*)|*.*"
CommonDialog1.ShowOpen
EFile = CommonDialog1.FileName
Text1.Text = EFile ' efile is a variable
'get workbook name
Form1.List1.Clear
Form1.lvwMap.ListItems.Clear
Form1.lvwSource.ListItems.Clear
'create workbook
On Error Resume Next
oSource.quit
Set oSource = Nothing
Set oSource = CreateObject("Excel.Application")

oSource.Visible = False
oSource.workbooks.Open EFile
'oSource.Workbooks.Open sName
'list sheets in workbook
For i = 1 To oSource.SHeets.Count
Form1.List1.AddItem oSource.SHeets(i).Name
Next
'List1.ListItems.Add
End Sub


Private Sub Command1_Click()
AutoMap
End Sub

Private Sub Command2_Click()

CommonDialog1.Filter = "MS Excel Files(*.xls)|*.xls|All Files(*.*)|*.*"
CommonDialog1.ShowOpen
DFile = CommonDialog1.FileName
Text2.Text = DFile ' efile is a variable
'get workbook name
Form1.List4.Clear
Form1.lvwMap.ListItems.Clear
Form1.lvwSource.ListItems.Clear
'create workbook
On Error Resume Next
oDest.quit
Set oDest = Nothing
Set oDest = CreateObject("Excel.Application")
oDest.Visible = False
oDest.workbooks.Open DFile
'oSource.Workbooks.Open sName
'list sheets in workbook
For i = 1 To oDest.SHeets.Count
Form1.List4.AddItem oDest.SHeets(i).Name
Next
End Sub


Private Sub Form_Load()
Set oDest = Nothing
Set oSource = Nothing
Form1.WindowState = 2
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
oSource.quit
oDest.quit
Set oSource = Nothing
Set oDest = Nothing
End Sub

Private Sub List1_Click()
Call ListSourceHeaders(List1)
End Sub
Private Sub List4_Click()
Call ListDestHeaders(List4)
End Sub
Sub ListSourceHeaders(ByVal shName As String)
Dim i As Long
'get the header count
'Clears out the listview so we won't see invalid columns or sheets
Form1.lvwMap.ListItems.Clear
Form1.lvwSource.ListItems.Clear

With oSource.workbooks(1).SHeets(shName)
.Activate
.range("A1").Select
.range(oSource.Selection, oSource.Selection.End(-4161)).Select '-4161 = xlToRight
'fill headers in listbox
For i = 1 To oSource.Selection.Count
Form1.lvwSource.ListItems.Add , , .Cells(1, i).Value
Next
End With

End Sub
Sub ListDestHeaders(ByVal shName As String)
Dim i As Long
'get the header count

Form1.lvwMap.ListItems.Clear
Form1.lvwDest.ListItems.Clear

With oDest.workbooks(1).SHeets(shName)
.Activate
.range("A1").Select
.range(oDest.Selection, oDest.Selection.End(-4161)).Select '-4161 = xlToRight
'fill headers in listbox
For i = 1 To oDest.Selection.Count
Form1.lvwDest.ListItems.Add , , .Cells(1, i).Value
Next
End With

End Sub

'Following code was modified from http://www.ghosttech.com/ "Fun with Listview's" example

Private Sub lvwDest_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)

Dim tItem As ListItem
Dim tDestItem As ListItem
Set tDestItem = lvwDest.HitTest(x, y)
Set tItem = lvwMap.ListItems.Add
With tItem
.Text = Data.GetData(vbCFText)
.SubItems(1) = lvwSource.SelectedItem.Index
.SubItems(2) = tDestItem.Text
.SubItems(3) = tDestItem.Index
End With


End Sub

Private Sub lvwDest_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)

If lvwDest.HitTest(x, y) Is Nothing Then
Effect = vbDropEffectNone
Else
Effect = vbDropEffectCopy
End If

End Sub

Private Sub lvwMap_ItemClick(ByVal Item As MSComctlLib.ListItem)

lvwMap.ListItems.Remove (lvwMap.SelectedItem.Index)


End Sub

Private Sub lvwSource_OLEStartDrag(Data As MSComctlLib.DataObject, AllowedEffects As Long)

Data.Clear
Data.SetData lvwSource.SelectedItem.Text, vbCFText

End Sub

' =========================== end code===========================


I'am trying this but getting an "out of bounds error"


Public Sub AutoMap()
Dim tItem As ListItem
Dim tDestItem As ListItem
Set tDestItem = lvwDest.HitTest(x, y)
Set tItem = lvwMap.ListItems.Add


Dim i As Integer, j As Integer, y1 As Long, y2 As Long
For i = 0 To lvwSource.ListItems.Count - 1 'iterate lstfrom
For j = 0 To lvwDest.ListItems.Count - 1 'iterate lstto
If lvwSource.ListItems(i).Text = lvwDest.ListItems(j).Text Then
With tItem
.Text = Data.GetData(vbCFText)
.SubItems(1) = lvwSource.ListItems(i)
.SubItems(2) = tDestItem.Text
.SubItems(3) = tDestItem.Index
End With
Exit For
End If
Next j
Next i

Example1 of output: ALL FIELDS MATCH

lvwSource listview
CUSTNUM
MFGNUM
MFRNAME
DESC
DESC2
LOCATION1
LOCATION2

lvwDest listview
CUSTNUM
MFGNUM
MFRNAME
DESC
DESC2
LOCATION1
LOCATION2

I press a command button


lvwMap: Map listview look like
CUSTNUM CUSTNUM
MFGNUM MFGNUM
MFRNAME MFRNAME
DESC DESC
DESC2 DESC2
LOCATION1 LOCATION1
LOCATION2 LOCATION2

Example2 of output: SOME FIELDS MATCH

lvwSource listview
CUSTNUMBER
MFGNUM
MFRNAM
DESCRIPTION
DESC2
LOCATION
LOCATION2

lvwDest listview
CUSTNUM
MFGNUM
MFRNAME
DESC
DESC2
LOCATION1
LOCATION2

I press a command button


lvwMap: Map listview look like
MFGNUM MFGNUM
DESC2 DESC2
LOCATION2 LOCATION2



Thanks
fordraiders

How To Copy Listitems In Listview To Another Listview?
I have "LISTVIEW 1" with 8 columnheader, I just want to show only 2 columnheader together with its items in "LISTVIEW 2" . How I can do that? Have sample as starting point

Content Of Listview
How can i see if a word is listed in a listview or listbox. I want it to search for the word "Class 1" when i press a button in the listview or listbox. (doesnt really matter wich one)

Get Content Of 2 Listview
hi
Im having two user control on a same form that contains 2 listview. id like to take the content of 1 listview by usercontrol and put it in another listview

im presently able to do the content of one listview in one user control but i dont know how to get the content of the second one in the other user control

somebody have an idea ??

here is the code for the content of the first listview :



VB Code:
For i = 1 To lvwAlarmList.ListItems.Count Set itmx = lvwAlarmePrint.ListItems.Add(, , lvwAlarmList.ListItems.Item(i))     For j = 1 To lvwAlarmList.ColumnHeaders.Count - 1     itmx.SubItems(j) = lvwAlarmList.ListItems.Item(i).SubItems(j)    Next jNext i


thanks

Printing The Content Of Listview
hello good day to all..!

how can i print in datareport the content of my listview..
all field will just come from listview not in sql..
hope you guys there could help me..
thanks in advance..!

How To Take A Printout Of Listview Content
hi all,

how can i take printout of listview contents. basically i want to transfer the contents of listview to crystal report. am using VB 6 and crystal report 8.0


saj

Edit Content In Listview
Hi!
I need to be able to edit every row under a column in a listview control. VB does this almost automatic with the labeledit property, but only with the listitem (the first column), not the listsubitems..

I could of course swap the order of my columns, but that would look very weird

Any suggestions?

Printing Out The Content Of A ListView?
Dear Gurus!

Could anybody advise me how to Print Out the content (all the items and all the columns) of a ListView?

Thank you in advance!

Compare Text In Listview
How can i compare a string with a string in a listview. I have a listview on my form and i can add lines of text into it. But i want it to notify me when it see's a line thats already been entered, but i dont know how to do this.

How To Display Content Using ListView Control?
hi,

I would like to know how i can use the list view and display something. i already know how to set the property during design time. but here, i have a problem in using list view to do something i want to do.

i have a scan logic, which scan a particular folder recursively to find out how many file is inside the particular folder, problem is how i can bring all the result and display it in a list view box. and each of the file, have to print at new line or next line.

in this case, can anybody give me some idea on how to do so. thank you.

Regards,
phfactor

Save Listview Content Into Database
hello,

i am trying to save the content of the listview into a database by using the following code but its not working.

can someone help me figure out what is wrong with this code ?
thanks for any help.
usin.

'--------the code-----------

Private Sub cmdsave_Click()

Dim i As Integer
Data1.DatabaseName = "c:windowsdesktopstep one list viewusin.mdb"
Data1.RecordSource = "belanja"
RecordsetType = 0

For i = 1 To ListView1.ListItems.Count

Data1.Recordset("butiran") = ListView1.SelectedItem.SubItems(1)
Data1.Recordset("jumlah") = ListView1.SelectedItem.SubItems(2)
Data1.Recordset.AddNew

Next
End Sub

Newbie Question On Saving Listview Content
I have a listview object in report/grid format. I can add items, delete items sort columns by clicking on the column header.

Question - Is there a way of saving the information in the listview that the user adds without using a database?
(It is unlikely the user will have more than 200 rows x 10 columns)

If the answer is no, could someone point me to an example or tutorial on databases. I have taken several but I still have not got it through my thick skull.

Thanks everyone.

ListView To ListView Copy
Is there a way to Copy Items from one listview to another, without going through each item?

Listview To Listview Copy
I'm looking for some sample code that shows you how to copy selected contents from one listview control to another listview control. Can anyone help me out with that?

Thanks much.

How I Can Compare Two Listviews
hi.

how i can compare data with two listviews.

i have two listviews and i want to compare them, the differente data i want to save them in a textfile(*.txt).

thx

Compare Filelistbox File Names To Listview List Items
Hi all,

I am trying to compare file names in a file listbox to list items in a list view and return only those file names that are not present in the listview. I am having trouble with arranging the two "For" "Next" loops as I am not getting the desired results. The code below returns several instances of all filenames in the filelistbox. I would really appreciate if someone could tell me where my code has gone a stray. Thanks in advance.

Dim o As Integer
Dim p As Integer
Dim itemP As ListItem

For p = 0 To File1.ListCount - 1
For o = 1 To ListView1.ListItems.Count - 1
If Not (File1.List(p) = ListView1.ListItems(o).Text) Then

Set itemP = ListView2.ListItems.Add(1, , File1.List(p))

End If
Next o, p

Copy A Listview To Another
Hi, can anyone guide me on how to copy a ListView to another. This is my Problem, I show some textbox and when data entry push a button that data is inserting into a Listview 'A'. If someone decide not to save the new lines, I want to restore de old Listview. I was Thinking in make a clone 'B' before and then if data entry do not want to save the new data, simply copy 'B' to 'A' and keep my old data ... but I don't know how to do it.

Please hlp me. Thks.

Copy Listview
Hi
Id like to copy the content of a listviewto another listview, does somebody have an idea of the way i can do this


thanks
Mel

Copy ListView
Hi, I am trying to copy the contents of one listview (named lstActRec) to another one (name lstRecords). I thought it would be a simple task. But I'm running into problems.
I am using the code below, The only thing that happens is the first row of lstActRec gets copied to the seconed listview a bunch of times and that's it. Can anyone tell me what's wrong?


Code:
For i = 1 To frmMain.lstActRec.ListItems.Count
frmMain.lstActRec.ListItems.Item(i).Selected = True
Set lvw = frmMain.lstRecords.ListItems.Add(, , .Text)
lvw.SubItems(1) = .ListSubItems(1)
lvw.SubItems(2) = .ListSubItems(2)
lvw.SubItems(3) = .ListSubItems(3)
lvw.SubItems(4) = .ListSubItems(4)
lvw.SubItems(5) = .ListSubItems(5)
lvw.SubItems(6) = .ListSubItems(6)
lvw.SubItems(7) = .ListSubItems(7)
lvw.SubItems(8) = .ListSubItems(8)
lvw.SubItems(9) = .ListSubItems(9)

Set lvw = Nothing
Next i

ListView Copy
Hello to all,

Here is my CustomerListView

[x] John Don 102 Pearl Street
[x] Dean Harris 89 Pine Street
[ ] Sammy Davis 104 River Dale Street
[X] John Remierz 40-40 Orange county Fla 10293

<Show>

I want to click the Show button and open a popup form.
The popup form has another listview (customerDetails).
I need to copy ~~Only~~ the ones that are check in the CustomerListView to CustomerDetails Listview.

How do you copy from one listview to another. Keep in mind that I also have an ico in the CustomerListView and I need to bring that too.

I seen someone done this before but can't find the sample.
thanks for any help

Copy From Listview
Hi all!
I have a few problems with my listview. What i want to do i be able to copy the selected item and then be able to paste it some where else on the form. All i have now is basicly the popup menu with "Copy" and Paste", but i have no code behind it.
I´m guessing i should use the "ListView1.SelectedItem.Text" property somehow, but this only returns the text in the first column. I have multiple columns that are created based on user selection, so the number of columns will vary.
Also, when i left-click on the listview, the entire horizontal row of items is selected, not just the item i clicked on.
I´m thinking i should work that part out before proceeding the the copy/paste problem. Does anyonehave any suggestion?

Cheers!
Maverick



Edited by - Maverick2004 on 1/30/2005 12:08:16 PM

Listview Copy
Hi, guys!!

Can I copy all rows in a ListViewCtrl? Remember that default is select only the first colunm.


Any Help? Thanks for your help

Copy Listview Object
Hello!

It is possible to copy the listitems for one listview to another without make a cycle ?

Thanks

Listview: Copy Value In Column
Hello gurus

Situation:

Object= Listview
--------------
| Name | ID |
--------------
| John | 1 |
| Jenny | 2 |
| Joe | 3 |
| Jimmy | 5 |
| Nick | 6 |
| Susan | 7 |
--------------

What I want to do is to copy ID value from Listview's ID column and place it into a Combobox.
BUT the value that will be copy stated from selected row. For example, when I click Jenny, ID that will be copy

into Combobox are 2,3,5,6, and 7.

How to do that?

Thank you.

Select And Copy A Row From A Listview
I have this listview with a number of rows and columns or items and subitems. I want that, when I click on a row, the various subitems on that row are copied to a number of textboxes.

Copy ListView Row To Clipboard
Hi,

I thought this one should be very easy but somehow I can't figure out how to copy the content ( text and numbers in a row) of my Listview Object (ListMain.View = lvwReport, MultiSelect = True, FullRowSelect = True) to the clipboard.
I don't care if you have to click, doubleclick or use right mouseclick, Strg+C,for the row to be copied.


As you may have noticed I'm not a native English speaker and I just started programming so please be patient.

Thanks a lot in advanced.

Q

COPY/PASTE Possible In Listview?
I was wondering how to copy text from a feild in a listview on a form.
The user should be able to copy the text and paste in another textbox.

Copy Listview Text
I want to be able to copy and paste text from a listview, but I am unable to place my cursor in the listview and highlight the text to begin with. What to do?

Listview Copy To Clipboard
I searched the forum and found this code that copies all the items to the Clipboard, but only one column. My listview has 2 columns. Can someone help me alter this to copy both columns to the Clipboard? Thanks


Dim tmpString$
For i% = 1 To ListView1.ListItems.Count
tmpString$ = tmpString$ & ListView1.ListItems.Item(i%) & vbCrLf
Next
Clipboard.SetText tmpString$

How To Copy Listview Contents
I have a ListView with 7 columns of data and anywhere from 1 to 255 rows of data. I would like to be able to have the user right-click on the data and copy all of it to the clipboard. Probably would be best to have it in tab-delimited format. Any ideas? Thanks!!!

Is That Possible To Copy From Any Text Of Listview To Textbox
I'm using listview on the Userform with textbox
is that possible when I click on any text of any columns of Listview it will copy to texbox.

Is It Possible To Copy The Item From Listview To Sheet?
Is it possible to copy the item from listview to sheet?

Cut/copy Files From Listview To Explorer
pals...

this is my first post and i hope, i m not makin any mistakes...(if i do then plz guide me.)

i m coding a project for my office,,and m stuck at a point.
i m using a listview control to list files that my program searches based on certain parameters, after listing, wot i need to do is, if i press ctr+C then the file should be copied into clipboard so that if i press ctr+v in explorer, then the file should be copied in explorer. same way, if i press ctr+X then the file should be cut into clipboard... and acc...

but couldnt find it, how to do it appropriately......
got hold of certain API's,


Code:
Private Declare Function EmptyClipboard Lib "user32" () As Long
Private Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function SetClipboardData Lib "user32" (ByVal wFormat As Long, ByVal hMem As Long) As Long
Private Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Long) As Long
but i think i can make ctr+c 2 work, usin these, but how to implement ctr+X.

needed some idea's pals.....

waiting for a prompt reply...

thanx

angel

Simple Listview Copy Problem
hi, me again,

today i've built a simple listview:

Private Sub InitMyListViewSchemas()

With Myschema
.ColumnHeaders.Add , , "Schema"
.ColumnHeaders.Add , , "Mag het?"
.ColumnHeaders.Add , , "Echt?"
.ColumnHeaders(1).Width = (.Width / 4) - 100
.ColumnHeaders(2).Width = (.Width / 2) - 100
.ColumnHeaders(3).Width = (.Width / 4) - 100
.FullRowSelect = True
.GridLines = True
.HideColumnHeaders = False
.LabelEdit = lvwManual
.LabelWrap = True
.View = lvwReport
End With
End Sub

and i fill it with:

Private Sub filMyListViewSchemas()
With lvSchemas
.ListItems.Add , , "Schema 1"
.ListItems(1).SubItems(1) = "Tuurlijk meid"
.ListItems(1).SubItems(2) = "Echt waar"
End With
End Sub

this all is not a problem, and i've also built some groovy stuff to select only a simgle column etc..., but now i want to just simply select a line (all of it), and press a button (named copy) and as a result, i should have an extra line in my listview, which says:

"kopie van schema 1 Tuurlijk meid Echt waar"
and i can't get it to work! simply put: how do i copy an entire line in a listview, with the possibility to add text?

VB6 ListView Copy/Paste To Clipboard
Hello --

I have a ListView control that I would like to provide three options within my VB6 application:

1) Export listview to CSV file
2) Print listview to printer
3) Copy/Paste listview to clipboard (using tabs or CSV between columns).

I think I have a clue about #1 and #2. I'm not sure how to accomplish this for #3.

If anyone has any sample code, tutorial, or can explain how this is accomplished, it would be greatly appreciated.

Thank you

Copy Listbox Contents To Listview
Hi.

I need to copy the entire contents of a Listbox (List1) to a Listview (LvP).

The Listbox has a single column and the Listview has 2 columns.

Each entry in the Listbox is made up of two sets of information seperated by a Tab, eg, X tab Description

I need the information copied over to the Listview so that the X is in the 1st column of the Listview and the Description is in the 2nd column.


I seem to be going round in circles and not getting anywhere.

Any ideas.

Steve.

Copy Selected Listview To Listbox
How can i copy all the selected items in a multiselect listview to a listbox

Copy Contents Of ListView To Word Doc
Hello,

Part of the VB app im working on requires that a report be copied to an MS Word doc, this is ok as so far it has been just VB TextBoxes copied to Word Bookmarks, but now I have a VB ListView and need to copy the contents to Word, does each item in the listview need to be copied to individual bookmarks or can I copy them to some sort of table or is there a listview in Word.

Any help would be much appreciated.

Thanks,
SKM.

Copy And Paste Listview Data
how do i change from the default so that i can copy and paste the data from the listview...

Listview Copy Single Subitem
Hello there!

I have a listview with a lot of rows.
I want the user to copy a part of a text in a subitem.
After that he can paste it in a textbox.

Does anybody have a clue how to do this?

Many thanx in advance!!

Copy Multiple Rows From One Listview To Another
Currently I have a program form that has 2 listviews on it. It is able to copy one item from one listview to another. Now the users want to be able to copy several at once from one listview and paste into the other at point/row where they click/selected. I hope that makes sense.
Here is what I have currently for the single copy/paste type of process:
[CODE]Private Sub cmdSetSeqNum_Click()

Dim ItmX As ListItem

On Error GoTo ERR_HNDL

Set ItmX = lvwSampleMap.SelectedItem

If (ItmX Is Nothing) Then Exit Sub

ItmX.EnsureVisible

ItmX = lvwInstrPositions.SelectedItem

CheckChanges

Exit Sub
ERR_HNDL:

StandardErrorOutput Err
End Sub
[/CODE]
Any help/suggestions would be greatly appreciated and thanks in advance.
~Becky

Listview Component - I Want To Copy/paste Items Out Of/into It.
So i have a list containing information, in this case its ingredients.

Well now i want to copy these ingredients(and their subitems) such as listview1.listitems(0).subitems(value ranging from 0 to 8) and paste it back into the list.

Would i require API for this, is it even possible?

Thanks im not smart enough to figure this out yet

Copy Listview Items To Another List View
Is there a quick way I can copy a list view item to another identical list view (ie having the same columns) without having to copy all the individual components separately. ie. the foreground colour, the icon, the sub items etc.

So basically something like:

set itmTo=lsvTo.ListItems.Add()
itmTo=lsvFrom.ListItems(nFrom)

The above code only copies the .Text property, not all properties.

Copy A Listview Item Similar To How Access Works
I'm in a bit of a situation. Currently, the software team at my office is trying to convince everyone else to move towards visual basic 6.0 (we want to move to .net, but one step at a time). well, in access, they were able to copy records and paste them into emails with the columnheaders and form names all in a nice little table without any extra code behind the scenes.

in visual basic however, that does not happen, and we are looking for a solution to this without having to reinvent the wheel.

any information on how to copy a listview record into a table with column headers and then put it on the clipboard would be great.

This is what the access version looks like

http://www.djandcristiwalker.com/Access.JPG

Copyright © 2005-08 www.BigResource.com, All rights reserved