1 Replies - 8920 Views - Last Post: 04 September 2011 - 01:32 AM Rate Topic: -----

#1 bajitech  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-September 11

Error "Type 'Excel.Application' is not defined"

Posted 04 September 2011 - 01:01 AM

hi,

can you help me, what's my mistake in my code

Private Function GetInfo() As Boolean
        Dim completed As Boolean = False

        Dim MyExcel As New Excel.Application   ---"error"
        MyExcel.Workbooks.Open(Me.TextBox1.Text)



        MyExcel.Workbooks.Close()
        MyExcel = Nothing

        Return completed

    End Function

This post has been edited by AdamSpeight2008: 04 September 2011 - 11:53 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Error "Type 'Excel.Application' is not defined"

#2 fixo  Icon User is offline

  • D.I.C Regular

Reputation: 85
  • View blog
  • Posts: 335
  • Joined: 10-May 09

Re: Error "Type 'Excel.Application' is not defined"

Posted 04 September 2011 - 01:32 AM

Try to write whole path

Dim MyExcel As New Microsoft.Office.Interop.Excel.Application()

This post has been edited by AdamSpeight2008: 04 September 2011 - 11:53 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1