Tried using this coding but no luck:
MsExcel.Range("B2").Value = List5.List(0)
MsExcel.Range("c2").Value = List5.List(1)
my list box name is listbox5. Thank you for any help you can provide
Edit by belisarius
Just adding text from the author's comment
here is the code I am trying to use it with:
Private Sub mdofficecommandbutton_Click() Workbooks.Open FileName:="C:\Documents and Settings\o075535\Desktop\Workstation- printer setup\Workstation blank template.xls" Sheets("LWS NEW BUILD").Cells(3, 6) = txtdepartment.Text Sheets("LWS NEW BUILD").Cells(3, 7) = 17012 Sheets("LWS NEW BUILD").Cells(3, 8) = txtprinter.Text Sheets("LWS NEW BUILD").Cells(3, 7) = 17004 Sheets("LWS NEW BUILD").Cells(3, 8) = txtprinter.Text MsExcel.Range("B2").Value = List5.List(0) MsExcel.Range("c2").Value = List5.List(1) End Sub