Hi,
This is my coding.........
Private Sub Command1_Click()
Dim xlApp As Excel.Application
Dim Wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim name As String
Set xlApp = New Excel.Application
Set Wb = xlApp.Workbooks.Open("E:\Projects\VB Excel to textfile\crse.xls")
Set ws = Wb.Sheets(1)
Open "C:\rolllist.xls" For Output As #1
For i = 1 To ws.UsedRange.Rows.Count
crseid = ws.Cells(i, 1)
crseno = ws.Cells(i, 2)
Print #1, crseid; crseno + "0"
Next i
Close #1
Wb.Close
Set Wb = Nothing
Set xlApp = Nothing
MsgBox "completed"
End Sub
crseid and crseno ---> output are getting displayed in the same row itself ( excel sheet that means A column) .But i dont need like this .I want to display crseid field in the column A and
crseno field in the B column .
Thanks in advance............