Results 1 to 12 of 12

Thread: Equivalent code of CreateObject in VB.net

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Posts
    340

    Question Equivalent code of CreateObject in VB.net

    Greetings everyone

    i am trying to bind/use objects in vb.net like excel.application etc etc. I am mainly a vb6 coder and now shifting and learning vb.net.

    in vb6 i can easily handle that by using createobject function

    here is the vb6 code:

    Code:
    Dim objXLS As Object
    Dim objWorkBook As Object
    Set objXLS = CreateObject("Excel.Application")
    objXLS.Visible = False
    Set objWorkBook = objXLS.Workbooks.Open("Excel File Goes Here")
    objWorkBook.SaveAs strCurPath & "\Temp.csv", 6
    objWorkBook.Close 2
    objXLS.Quit
    Set objWorkBook = Nothing
    Set objXLS = Nothing
    i have looked over internet and found below solution for c# but not for VB.net. and i failed to use dynamic type/command with vb.net.

    here is the link:

    Equivalent code of CreateObject in C#

    there is also messy way.. but i like to go with the easy way (label binding or so)

    so, is the any way to use dynamic key to use in vb.net or what is the Equivalent in vb.net?

    thanks in advance

    best regards
    Last edited by Shohag_ifas; Sep 20th, 2014 at 09:10 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width