I am having problems outputing to my excel spreadsheet. I need the entire sheet to all formatted as text. It is messing up my account numbers when formatted as a number.
This is what my code looks like, but it doesn't seem to like it.
VB Code:
Dim MyExcel As New Excel.Application Dim oWorkbooks As Excel.Workbooks = MyExcel.Workbooks Dim theWorkbook As Excel.Workbook = oWorkbooks.Add Dim oSheet As Excel.Worksheet Dim rng As Excel.Range Dim exFile As String Dim i As Integer Dim c As Integer
This is where I am trying to format as text:
VB Code:
oSheet.Range("A2:Z999").Select() oSheet.Selection.NumberFormat = "@"
Thanks in advance!




Reply With Quote