MikeLI 0 Newbie Poster

Hi All,

My VB.NET program uses tabControl, which consists 8 tabPages, as the user interface. Basically, everything is done there, except when Excel file is opened.

My program reads Excel file by the following function:
VB:

Private Sub btnReadFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReadFile.Click
    excelApp = New Excel.Application
    excelApp.Visible = True
    excelApp.UserControl = True
    excelApp.DisplayAlerts = False
    xls = excelApp.Workbooks.Open(txtInFile.Text)
    init()
EndSub

When the Excel file is read, it is not attached in the VB program, but shown up independently. How can I show it in one of the tabPages?

Mike

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.