Question:

Capture cell content from Excel into VB Textbox or Label. how to get values from dataset which is

by Guest7959  |  12 years, 9 month(s) ago

0 LIKES UnLike

how to get values from dataset which is filled by excell sheet fields

 Tags: capture, Cell, content, excel, label, textbox, VB

   Report

1 ANSWERS

  1. amomipais82
    Hi,
    Dim xl As Excel.Application
    Dim strFileName As String

    'under project_references_ check Microsoft Excel Objects.

    Private Sub Command1_Click()
    Set xl = CreateObject("excel.Application")

    xl.Workbooks.Open ("C:\my documents\test_bed.xls") ' substitute your file here
      xl.Visible = False
        
    Text1 = xl.Worksheets("Sheet1").Range("A1").Value
    Text2 = xl.Worksheets("Sheet1").Range("A2").Value


    ActiveWorkbook.Save


       xl.Application.Quit

       Set xl = Nothing
    Hope it helps

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 14 years, 8 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions