Hi: Can any one please tell me how to i increate the column size when data taransfer to column 10 as right now its outputting in scientific notation for cases where clt_ref_no is long only in column number 10

Thanks.

Public Sub ExportToExcel()

Dim n As Integer
Dim iRow As Integer
Dim iColumn As Integer

' create new instance of Excel Application
Set appExcel = CreateObject("Excel.Application")
' Add nwe workbook to application instance
appExcel.Workbooks.Add
' Set font and sixe of first title
appExcel.Cells.Range("A1:J1").Font.Bold = True
appExcel.Cells.Range("A1:J1").Font.Size = 14
appExcel.Cells(1, 5) = "Distribution Results"
' set the column width for the spread sheet
appExcel.Columns("C").ColumnWidth = 12
appExcel.Columns("D").ColumnWidth = 12
appExcel.Columns("E").ColumnWidth = 12
appExcel.Columns("F").ColumnWidth = 12
appExcel.Columns("G").ColumnWidth = 12
appExcel.Columns("H").ColumnWidth = 12
appExcel.Columns("I").ColumnWidth = 12
appExcel.Columns("J").ColumnWidth = 12
' set font for header
appExcel.Cells.Range("A3:J3").Font.Bold = True
appExcel.Cells(3, 3) = grdUserReassign.TextMatrix(0, 1)
appExcel.Cells(3, 4) = grdUserReassign.TextMatrix(0, 2)
appExcel.Cells(3, 5) = grdUserReassign.TextMatrix(0, 3)
appExcel.Cells(3, 6) = grdUserReassign.TextMatrix(0, 4)
appExcel.Cells(3, 7) = grdUserReassign.TextMatrix(0, 5)
appExcel.Cells(3, 8) = grdUserReassign.TextMatrix(0, 6)
appExcel.Cells(3, 9) = grdUserReassign.TextMatrix(0, 7)
appExcel.Cells(3, 10) = grdUserReassign.TextMatrix(0, 8)

' copy grid to excel sheet
For iRow = 1 To grdUserReassign.Rows - 1
appExcel.Cells(iRow + 4, 3) = grdUserReassign.TextMatrix(iRow, 1)
appExcel.Cells(iRow + 4, 4) = grdUserReassign.TextMatrix(iRow, 2)
appExcel.Cells(iRow + 4, 5) = grdUserReassign.TextMatrix(iRow, 3)
appExcel.Cells(iRow + 4, 6) = grdUserReassign.TextMatrix(iRow, 4)
appExcel.Cells(iRow + 4, 7) = grdUserReassign.TextMatrix(iRow, 5)
appExcel.Cells(iRow + 4, 8) = grdUserReassign.TextMatrix(iRow, 6)
appExcel.Cells(iRow + 4, 9) = grdUserReassign.TextMatrix(iRow, 7)
appExcel.Cells(iRow + 4, 10) = grdUserReassign.TextMatrix(iRow, 8)
Next iRow

' save worksheet and close it
appExcel.ActiveWorkbook.Close True, "Distribution " & Format$(Date, "yyyymmdd") & "-" & Format$(Time, "hhmmss") & ".xls"
' kill object
Set appExcel = Nothing
MsgBox "Your document is in My Documents with the name 'Distribution " & Format$(Date, "yyyymmdd") & "-" & Format$(Time, "hhmmss") & ".xls'"
LogEvent "Create Excel Report"

End Sub