Link to home
Start Free TrialLog in
Avatar of fp4645
fp4645

asked on

Open Excel File with VB

I am a student of VB.  I am trying to figure out how to open an Excel workbook by clicking on a button on my VB form.  I keep getting a message that the method is unsupported and the starred line is highlighted when I debug.  Can someone please tell me what I'm doing wrong?

    Dim xlApp As Excel.Application
    Dim xlWB1 As Excel.Workbook
   
    Set xlApp = New Excel.Application
    *Set xlWB1 = xlApp.OpenWorkbook("e:\paige\vb program\delinquent.xls")
    xlWB1.Close
    Set xlWB1 = Nothing
   
    xlApp.Quit
    Set xlApp = Nothing
ASKER CERTIFIED SOLUTION
Avatar of R_Rajesh
R_Rajesh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aminvb
aminvb

i want to shut down windows by vb code .(in every windows)
i can`t write english beter .
please help me .
thanks
aminvb
Use "unload" command.