Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub cmdLink_Click()
- 'Close this window... Save the link... Add to listview in previous window
- 'Routine to generate the next available linkID
- ID = 1000
- Open App.Path & "\LinkFile.rnd" For Random As #1 Len = Len(alinksfile)
- While Not EOF(1)
- Get #1, ID, LinkRecord
- If LinkRecord.ID = 0 Then
- ID = ID
- Else
- ID = ID + 1
- End If
- Wend
- Close #1
- End If
- 'Retrieve the selected item from the listview and put it into the file as a new record
- LinkRecord.ID = ID 'comment
- LinkRecord.itemID = ListView1.SelectedItem.ListSubItems 'comment
- LinkRecord.LinkedID = ListView1.SelectedItem.ListSubItems(1) 'comment
- 'Add the new item into the listview back in the original item's window
- frmAppointment.ListView1.ListItems(i).ListSubItems.Add , , LinkRecord.ID
- frmAppointment.ListView1.ListItems(i).ListSubItems.Add , , LinkRecord.LinkedID
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement