Ok, I'm writing a very basic program that pulls data from an excel spreadsheet into VB.
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
Dim range As Excel.Range
Dim Obj As Object
xlApp = New Excel.Application
xlWorkBook = xlApp.Workbooks.Open("C:\test.xlsx")
xlWorkSheet = xlWorkBook.Worksheets("Slingers Sum")
range = xlWorkSheet.UsedRange
Obj = CType(range.Cells(2, 1), Excel.Range)
TextBox1.Clear()
TextBox1.Paste(Obj.value)
Lets say that Obj.value is actually a number 32500.
How can I get this number to display as a formatted numeric value of 32,500.
I just can't seem to make this work.
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
Dim range As Excel.Range
Dim Obj As Object
xlApp = New Excel.Application
xlWorkBook = xlApp.Workbooks.Open("C:\test.xlsx")
xlWorkSheet = xlWorkBook.Worksheets("Slingers Sum")
range = xlWorkSheet.UsedRange
Obj = CType(range.Cells(2, 1), Excel.Range)
TextBox1.Clear()
TextBox1.Paste(Obj.value)
Lets say that Obj.value is actually a number 32500.
How can I get this number to display as a formatted numeric value of 32,500.
I just can't seem to make this work.