writing and reading to excell 2007

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • radom
    New Member
    • Feb 2008
    • 37

    writing and reading to excell 2007

    how do I make vb2008 read/write to excell 2007
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by radom
    how do I make vb2008 read/write to excell 2007
    open the excel application as an object, then you can use VBA syntax for this object, e.g.

    [CODE=vb]dim obj1 as object
    set obj1 = createobject("e xcel.applicatio n")
    obj1.workbooks. open("c:\myBook .xls") 'Check the extension, since it changes for office 2007
    obj1.visible=tr ue
    msgbox obj1.cells(1,1) 'this will show you a msgbox with the first cell's value[/CODE]

    that should give you an idea.

    Comment

    Working...