Retrieving data from excel using VB6

By manojgadiyar ·
I am new to vb6.I have just started programming in vb6. Can you please tell me in detail as to how can i retrive data from an excel spread sheet using vb6.


This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Answers

Collapse -

follow this coding

by kansatheesh In reply to Retrieving data from exce ...

Dim ExcelApp As Excel.Application
Dim WS As Excel.Worksheet
Dim i As Integer
Dim stra As String

Set ExcelApp = CreateObject("excel.application")
ExcelApp.Workbooks.Open ("C:\txtExce")'pathname Set WS = ExcelApp.ActiveWorkbook.Sheets(1)

Dim myVal, myval1 As Variant
myVal = WS.Range("a2").Value
Debug.Print (IsArray(myVal))
Text1.Text = myVal
'MsgBox "Value is: " & myVal
myval1 = WS.Range("b2").Value
Text2.Text = myval1
Set WS = Nothing
Set ExcelApp = Nothing

Back to Software Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums