rweatherly
Here is some VB6 code which will read a Excel file when the data is in columns : X figure in Column A: Y figure in B: Z figure in C, and paste into a textbox in your
VB program.
This may help to get you started with
VB Express if this is what you require.
Pics show the data in Excel and the
VB text box which can be scrolled.
Private Sub Command1_Click()
Dim xlApp As Excel.Application
Dim xlBook1 As Workbook
Dim xlSheet1 As Worksheet
Set xlApp = Excel.Application
Dim strX As String
Dim strY As String
Dim strZ As String
Dim strLine As String
Dim strACell As String
Dim strBCell As String
Dim strCCell As String
FileName = "C:\TestXYZ2TextBox\Book1.xls"
Set xlBook1 = xlApp.Workbooks.Open(FileName)
xlApp.Application.ScreenUpdating = True
'xlApp.Visible = True
For L = 2 To 10
strLine = L
strX = "": strY = "": strZ = ""
strACell = Chr$(65) + strLine
Range(strACell).Select
strX = CStr(ActiveCell.Value)
strBCell = Chr$(66) + strLine
Range(strBCell).Select
strY = CStr(ActiveCell.Value)
strCCell = Chr$(67) + strLine
Range(strCCell).Select
strZ = CStr(ActiveCell.Value)
strData = strData & "X" & strX & " Y" & strY & " Z" & strZ & Chr$(13) & Chr$(10)
Next
txtData.Text = strData
End Sub