Experts Exchange connects you with the people and services you need so you can get back to work.
For cnt = 0 To lvPartfiles.CheckedItems.Count - 1 ' lvPartfiles.SelectedItems.Count - 1
If lvPartfiles.CheckedItems.Count <> 0 Then
_File_Selected = lvPartfiles.SelectedItems(cnt).Text
If lvPartfiles.SelectedItems.Item(cnt).ForeColor = Color.Red Then
MessageBox.Show("File has no XYZ Definitions associated with it. User must Edit and Upload the XYZ Definitions.", "XYZ Definition Warning Message", MessageBoxButtons.OK, MessageBoxIcon.Warning)
For Each file As String In System.IO.Directory.GetFiles(_dir_name_XML_Files, "*.xml")
XML_File_Name_Only = file
xmlFile = file
slashPosition = file.LastIndexOf("\")
XML_File_Name_Only = xmlFile.Substring(slashPosition + 1)
XML_File_Name_Only = System.IO.Path.GetFileNameWithoutExtension(XML_File_Name_Only)
'Compares the two files
If LMI_File Like "*########" Then
LMI_File = LMI_File.Remove(LMI_File.Length - 12)
If LMI_File = XML_File_Name_Only Then
'Opens the selected XML File that matches the .LMI File selected in the List.
Open in new window
Your question, your audience. Choose who sees your identity—and your question—with question security.
For cnt As Integer = 0 To ListView1.CheckedItems.Count() - 1
Dim i As Integer = ListView1.CheckedIndices(cnt)
Dim myText As String = ListView1.Items(i).Text ' text from checked line
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $349.00.
Premium members get this course for $151.20.
Premium members get this course for $174.99.
Premium members get this course for $31.25.