I have tried following code to open an existing excel file. the code gets executed but the excel file does not appear on the monitor please help.
Dim xlTmp As Excel.Application
Set xlTmp = New Excel.Application
xlTmp.Workbooks.Open "L:\FormsNRegisters\Accounts\Bill_Forms.xls"
Dim xlSht As Excel.Worksheet
Set xlSht = xlTmp.Sheets(1)

Re: Visual Basic 6 80 80

try this

Dim xlApp As Excel.Application
Dim xlWB1 As Excel.Workbook

Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlWB1 = xlApp.Workbooks.Open("L:\FormsNRegisters\Accounts\Bill_Forms.xls")
Re: Visual Basic 6 80 80

try this

Dim xlApp As Excel.Application
Dim xlWB1 As Excel.Workbook

Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlWB1 = xlApp.Workbooks.Open("L:\FormsNRegisters\Accounts\Bill_Forms.xls")

Thank u abu Taher. it works

Be a part of the DaniWeb community

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