118 Topics

Member Avatar for
Member Avatar for JModak

The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) My Code is Private Function GetXlUsedRange(ByVal filePath As String) As Object(,) Dim xlApp As Excel.Application Dim xlWorkbooks As Excel.Workbooks Dim xlWorkbook As Excel.Workbook Dim xlSheets As Excel.Sheets Dim xlWorkSheet As Excel.Worksheet Dim xlRange As Excel.Range xlApp = New Excel.Application xlWorkbooks …

Member Avatar for tinstaafl
0
52
Member Avatar for Papa_Don

Group, I've written some code to populate a listview using 3 fields from a database. When creating the listview, I named the individual columns for appearance purposes, (Account No, Company Name and Name). Those columns are being populated appropriately as expected. However data column names are being shown in column …

Member Avatar for xrjf
0
3K
Member Avatar for JModak

I create a project on vb.net 2010 and SQL server 2008r2 I showing a report in listview report am show fine and error free. But now I want to add a sub total column every end of the category. How it is possible please help me sir Please see the …

Member Avatar for Santanu.Das
0
456
Member Avatar for JModak

How to change the color of a cell(back or fore color) of listview item according to item value with if condition. I do it but it is not work and show no error Please help me...... For k = 0 To ListView1.Items.Count - 1 If ListView1.Items(k).SubItems(6).Text > 100 Then ListView1.Items(k).SubItems(6).ForeColor …

Member Avatar for Reverend Jim
0
358
Member Avatar for Reverend Jim

Several people have asked how to export data to Excel. This code snippet shows how to export the data from a listview in details mode to a new Excel spreadsheet. Take note of the comments in the header to avoid having orphaned Excel.exe tasks eat up your system memory.

Member Avatar for Reverend Jim
7
9K
Member Avatar for kberrianjr

I am currently working on a program to track my mile for my monthly expense report for work. Everything is working great, however, I can not for the life of me find a code to write 8 lines from the text file back into the listview on my form. I …

Member Avatar for Reverend Jim
0
695
Member Avatar for Begginnerdev

Hello Daniweb, and thank you for taking the time to read this post. I have a question of efficiency. I am wondering, what is the most efficient way to print from a listview. The listview's values are loaded from a database, and I would like to print from that listview. …

Member Avatar for Ivan_14
0
6K
Member Avatar for yoyie_333

How to get values from listview and display it to textbox using sql database ? and then i can update the items in listview using a button..then refresh the listview after i click the button... tnx for the help in advance..im just a newbie in vb.net ![0da2d193278007986792bf92e19433ab](/attachments/large/4/0da2d193278007986792bf92e19433ab.png "0da2d193278007986792bf92e19433ab")

Member Avatar for Mr.M
0
8K
Member Avatar for westsiderailway

Hello Everyone, This time i am not asking for any help :-) I am showing anybody ,who wants to know how to add a $ sign into any item/subitem in Listview. Did try to add colour,BUT, there is a BUG in VS. you can code for differant colours in subitems,BUT …

Member Avatar for westsiderailway
0
463
Member Avatar for westsiderailway

HI again, I would like to know how i would use a loop for the following code, thanks for read this. LV1.Columns.Add(ds.Tables(0).Columns(0).ColumnName, 25) LV1.Columns.Add(ds.Tables(0).Columns(1).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(2).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(3).ColumnName) LV1.Columns.Add(ds.Tables(0).Columns(4).ColumnName) LV1.Columns.Add(ds.Tables(0).Columns(5).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(6).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(7).ColumnName, 75) LV1.Columns.Add(ds.Tables(0).Columns(8).ColumnName, 75) LVitem.Text = dt.Rows(0).Item(0).ToString LVitem.SubItems.Add(dt.Rows(0).Item(1).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(2).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(3).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(4).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(5).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(6).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(7).ToString) LVitem.SubItems.Add(dt.Rows(0).Item(8).ToString) i was …

Member Avatar for westsiderailway
0
4K
Member Avatar for westsiderailway

Hello everyone, was looking to see what was availble in listview1.columns.add.... and found this ListView1.Columns.Add("ID", FontDialog, HorizontalAlignment.Center) how would i use this to change the font in listview columns.? the rest of the code... ListView1.Columns.Add("Weekday", 100, HorizontalAlignment.Left) ListView1.Columns.Add("Fuel Date", 80, HorizontalAlignment.Left) ListView1.Columns.Add("Fuel Time", 80, HorizontalAlignment.Left) ListView1.Columns.Add("Location", 60, HorizontalAlignment.Left) ListView1.Columns.Add("Pump", 50, …

Member Avatar for djjeavons
0
263
Member Avatar for roxxime14

i have a listview connecting to xampp,then i want the data of all listview can be add to my report using report viewer?how can i do that. pls help.. <snip>

Member Avatar for Begginnerdev
0
200
Member Avatar for Diana Rose_1

imade this query and named it as vwOwnerAnimal. my problem is that i don't know how to display it using listview. can anyone pls help me. SELECT tbowner.owner_code, tbowner.owner_name, tbowner.owner_add, tbowner.owner_cn, tbowneranimal.a_name, tbowneranimal.a_breed, tbowneranimal.a_age, tbowneranimal.a_sex FROM tbowner INNER JOIN tbowneranimal ON tbowner.owner_code = tbowneranimal.owner_code;

Member Avatar for tinstaafl
0
212
Member Avatar for Qromium

Closing my program saves the entire listview. Opening the program restores the entire listview, however, each item loses it's ImageKey. How do I restore the ImageKey when reopening the program? A better way of putting it: If any item in the listview has the same name as any item from …

Member Avatar for Qromium
0
261
Member Avatar for DeepKiran

I Have A DataTable In MSAccess TbJform and I want to Show the Columns of TbJform in ListView.................The Columns Are JformNo,JformDate,PartyName,Bags,Packing,Loose etc.............now what sholud i do to show the all the colmns in listview...

Member Avatar for DeepKiran
0
208
Member Avatar for Abigail.Galingan

how can i display selected records from my database(phpmyadmin) in listview using a search button? any reply will be a great help for me.. thank you.

Member Avatar for tinstaafl
0
203
Member Avatar for Shodow

how to make this print fit to page my listview data doesn't fit in the page help please Private Sub PrintDetails(ByRef e As System.Drawing.Printing.PrintPageEventArgs) Static LastIndex As Integer = 0 Static CurrentPage As Integer = 0 'Getting the current dpi so the textleftpad 'will be the same on a different …

Member Avatar for oussama_1
0
366
Member Avatar for johnnyboy123

Hi everyone, I am quite new to vb.net. Recently, I've been learning about Oledb commands and it's ability to save records in a form to a database. So, I started a project and now I am stuck. Here's the scenario: The form comprises of several comboboxes, a listview box and …

Member Avatar for Reverend Jim
0
470
Member Avatar for riayas

I have 2 forms , form one has a datagrid with 10 columns form 2 has a listview box with 4 columns i want to populate the listview columns with 4 of the values from a row in the datagrid when the row is selected and the 'add ' button …

Member Avatar for riayas
0
714
Member Avatar for Shodow

how to avoid duplicate lvList DoubleClick() Dim line = lvList.SelectedIndices(item.Text) lvPrint.Items.Add(lvList.Items(line).Clone())

Member Avatar for G_Waddell
0
227
Member Avatar for mokushirokuxen

![7d2f0b828b7075213b3cc4ce79ce21d1](/attachments/large/4/7d2f0b828b7075213b3cc4ce79ce21d1.png "7d2f0b828b7075213b3cc4ce79ce21d1") i have 2 database listview1(from tbl_storage) listview2(fromsales) so i want my listview items and subitems to be increment or be loop correct me if im wrong with that. sellingprice and Qty.(Quantity) ex. itemno | name | qty| price | total | 1 | a | 1 | 100 …

Member Avatar for mokushirokuxen
0
457
Member Avatar for glenn_boy13

Hello, I have a listview1 in my form. And my form has the ability to fullscreen itself. In the meantime, I have this code: ListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize) But that would only depend on the listview's headersize. or the column's header width. I would like my all columns to share equal width. For …

Member Avatar for deceptikon
0
537
Member Avatar for oks1998

Dim hTable As Hashtable = New Hashtable() Dim duplicateList As ArrayList = New ArrayList() Dim itm As ListViewItem For Each itm In ListView1.Items If hTable.ContainsKey(itm.Text) AndAlso hTable.ContainsKey(itm.SubItems(1).Text) AndAlso hTable.ContainsKey(itm.SubItems(2).Text) AndAlso hTable.ContainsKey(itm.SubItems(3).Text) Then 'duplicate duplicateList.Add(itm) Else hTable.Add(itm.Text, String.Empty) End If Next 'remove duplicates For Each itm In duplicateList ListView1.Items.Remove(itm) Next I …

Member Avatar for tinstaafl
0
1K
Member Avatar for Deep Modi

I am trying to add the History page in my application which will work like as i shown below: 1st Column: (Date); 2nd column: (Login Time); 3rd Column: (Logout Time) I added the following code: Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load …

Member Avatar for Begginnerdev
0
310
Member Avatar for razree

Hi all, I really need your help on this one. I have a MSSQL db table with two columns-ID and name. Each row in this two columns contains an unique ID and a name. Now I have a query that imports just a name in the listview (I don't want …

Member Avatar for razree
0
1K
Member Avatar for Shodow

hi i have a code here that export my listview items to excel but i want to customize each cell size and i want to format the date and landscape environment Try Dim objExcel As New Excel.Application Dim bkWorkBook As Workbook Dim shWorkSheet As Worksheet Dim i As Integer Dim …

Member Avatar for G_Waddell
0
324
Member Avatar for DyO1

I added a ListView object, added few Columns, but the problem is there that I can't add no text to the other columns by making new Items Any help?

Member Avatar for Reverend Jim
0
177
Member Avatar for DyO1

I would like to make a Export / Import buttons that will save/open files that contain listView data (ListView Items) Can someone tell me is there a way to do this?

Member Avatar for DyO1
0
672
Member Avatar for anJelo.towT

can someone help me ? whenever i start this program its always says that " compile error type-declaration characters does not match declared data type. then the rs.Fields! will go hightlight. can someone help me ? Dim rs As Recordset Private Sub Form_Load() Dim list As ListItem ListView1.ListItems.Clear Set rs …

Member Avatar for tinstaafl
0
139
Member Avatar for olegb

HELP !! THis is driving me insane, I already spent 2 hours on this and can't seem to resolve it. Here is the problem: I have a backgroundimage for my listview in vb.net I programmatically (see below) add items to the list. All items have a white or other solid …

Member Avatar for olegb
0
658
Member Avatar for camillemimi

this code runs at my other sample prog. but when I try to use it to my actual prog., it wont work. (variables changed, connection's ok) . . . cant show data at listview [CODE] Imports MySql.Data.MySqlClient Public Class Form1 Public sconnection As New MySqlConnection Private Sub Form1_Load() If sconnection.State …

Member Avatar for Alvin_1
0
2K
Member Avatar for zbzHenry

hello, i am trying to save data in my listview item to access database.. i am new to programming and i am currently working on a project i need to submit very soon, this is really urgent and i will be much happy if i could get assisted as soon …

Member Avatar for Dili1234
0
614
Member Avatar for Lethugs

Hi, Im trying to load animated GIF's from a folder to my listview, I'm able to load it but not moving One more problem is, a lot of GIF are inside that folder,but the display in listview show the same image how can i fix it, is there better way …

Member Avatar for Lethugs
0
853
Member Avatar for macphill

how do add the total of items in listview column and display the result in a text box

Member Avatar for Reverend Jim
0
242
Member Avatar for Papa_Don

Hi group, I've been playing with a ListView and I'm struggling to get it to populated with info in a database. I'm hoping you may see something in my code that is creating the error. Dim con As New SqlConnection Dim cmd As New SqlCommand Dim rdr As SqlDataReader = …

Member Avatar for Hazuan Nazri
0
3K
Member Avatar for Nebil

Hi all, I was having a huge problem,i mean i spent days trying to fix it but i get the same exception everytime when i run the app. here's the thing i have a record that is loaded from the database using the listview.it works perfect for the insertion part.but …

Member Avatar for Begginnerdev
0
356
Member Avatar for grgrl

I would like to know how to take selected information from a listview and add them to a .dat file This is what i got so far but it is to save into a text file Sorry for any mistakes i am a noob Private _filepath2 As String = Application.StartupPath …

Member Avatar for grgrl
0
2K
Member Avatar for ImZick

Hi how can i sort using Month i have January, February.... December i want to sort it out so the user will see it from January - December my column name is "Months" and it is in subitems(0) Thank you in a advanced

Member Avatar for ImZick
0
571
Member Avatar for khair.ullah

hi all. I want to fill the Listview from a mssql database in vb.net but it not show all the data in Listview. I have the followning code. Dim sSQL As String Dim lvwItem As New ListViewItem() sSQL = "SELECT field1, field2, field3 FROM tablenam e " sSQL = sSQL …

Member Avatar for evadehawkeye07
0
6K
Member Avatar for ImZick

Hello its me again... sorry to keep on posting about my problem well here it goes.. If you see in the attached file. ![Sum](/attachments/large/4/Sum.jpg "Sum") I have an AM Ervielette, Marriane etc. now i need to add their Total Calls for Ervie and Total Visits same goes to the other.. …

Member Avatar for ImZick
0
282
Member Avatar for TIP.Synergy

Hi to Everyone, I want to get the total (column) amount using Listview w/o database VB.NET Help me please... Thanks.. _______________________________________________________________________________________________________ lstitems Item Name | Unit Price | Quantity | Amount ------------------------------------------------------------ Sample1 | 100.00 | 1 | 100.00 Sample2 | 100.00 | 1 | 200.00 Sample3| 100.00 | 1 …

Member Avatar for N.E.Y.O-01
0
6K
Member Avatar for ImZick

Hi guys I'm here again asking for help Can someone can gave me an idea about how to find all data in my first listview to another? ![Two_Listview](/attachments/large/4/Two_Listview.jpg "Two_Listview") Here is the picture. You see their are a column name AM in my first Listview and in the second their …

Member Avatar for ImZick
0
291
Member Avatar for maskinao

Hi! I want to be able to automatically select the first row in a listview then display the selected items in a text box. I've already done putting the data in the textbox by clicking the row, but i cannot do it automatically. any ideas? i would like to provide …

Member Avatar for Ancient Dragon
0
111
Member Avatar for ImZick

Help i need to import excel to my listview using adodb or oledb but i dont know how? in vb6 i use adodb and the code is like here Dim lngI as Long Dim lvItem as listItem *'adodb connection goes here...* *'then this code will import all excel data in …

Member Avatar for ImZick
0
2K
Member Avatar for LD Company

Hello programmers! I am making File Browser software and I want to display icons of my files in listview. Here is the code: ImageList1.Images.Clear() Dim di As New IO.DirectoryInfo(LocationA.Text) Dim aryFi As IO.FileInfo() = di.GetFiles("*") Dim fi As IO.FileInfo For Each fi In aryFi For Each files In System.IO.Directory.GetFiles(LocationA.Text) Dim …

Member Avatar for john.knapp
0
4K
Member Avatar for lymwale.pablo

Hello guys im in need of a help. I have a checkbox on a Listview1 and i also have listview2, textbox and 2 buttons. On listview1, i have a list of items and its subitems. Then im going to put a check on the one of the listview item then …

Member Avatar for tinstaafl
0
686
Member Avatar for reimar23

Can someone help me... I am new to vb.net with sql connection and I can't fix this error : variable name '@date' has already been declared. Variable names must be unique-- I need this to be fixed "ASAP" Im running out of time here because of the error here is …

Member Avatar for reimar23
0
337
Member Avatar for ZeroZen

Hey Folks! I'm using a windows hook to scroll horizontally through a listview. I have it aligned so it only adds items horizontally. I have 2 big buttons I'm using to scroll right and left with nice bitmaps on them... The problem is the listbox has scrollbars appear when I …

Member Avatar for ZeroZen
0
2K
Member Avatar for ZeroZen

Hey folks I'm using a listview to show an array of images that get taken from a webcam. I want them ordered on the bottom of the screen and be selectable for saving, so I'm using a listbox. Everything works okay, but when I add items to the listbox and …

Member Avatar for ZeroZen
0
290
Member Avatar for bala19891125

1.i hve create listview on form1..all data in listview from Sql2000 database..im using sql connection.. 2.in listview i hve not create a checkbox.. 3. i print all data in listview using ms report but only selected item in listview will display in report..i mean, display item that i hve select …

0
104

The End.