Question

  • Creator
    Topic
  • #2269901

    Retrieving data from excel using VB6

    Locked

    by manojgadiyar ·

    Hi,
    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.

    Thanks,
    manoj

All Answers

  • Author
    Replies
    • #2600713

      Clarifications

      by manojgadiyar ·

      In reply to Retrieving data from excel using VB6

      Clarifications

    • #2628141

      follow this coding

      by kansatheesh ·

      In reply to Retrieving data from excel using VB6

      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
      ExcelApp.Quit
      Set WS = Nothing
      Set ExcelApp = Nothing

Viewing 1 reply thread