I solved it, here's how i did it
1. Add a context menu
2. Add the following to Form Load
PHP Code:
mnuContext.MenuItems.Add(New MenuItem("Format 1", New EventHandler(AddressOf mnuFormat1_Click)))
mnuContext.MenuItems.Add(New MenuItem("Format 2", New EventHandler(AddressOf mnuFormat2_Click)))
lstSource.ContextMenu = mnuContext
3. Add the following subs to handle the mnuFormatX_Click events
PHP Code:
Sub mnuFormat1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
OpenFormat(1)
End Sub
Sub mnuFormat2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
OpenFormat(2)
End Sub
The Following is just to see what im doing so you get the point (it opens a spreadsheet displaying the different formats)
PHP Code:
Private Sub OpenFormat(ByVal intFormat As Integer)
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
oXL = CreateObject("Excel.Application")
oWB = oXL.Workbooks.Add
oWB = oXL.Workbooks.Open("C:\SpreadSheet Formats\Format " & intFormat & ".xls")
oXL.Visible = True
oXL = Nothing
oWB = Nothing
oSheet = Nothing
End Sub
hope this helps someone else with the same prob i had
daver