Demo entry 4806876

VB Test

   

Submitted by anonymous on May 19, 2016 at 01:19
Language: VB.net. Code size: 359 Bytes.

Dim objExcelApp As Object
Dim wb As Object
Sub Test()
    Set objExcelApp = CreateObject("Excel.Application")
    Set wb = objExcelApp.Workbooks.Open("path to my workbook")
     Set ws = wb.Sheets(1)

      ws.Cells(1,1).Value = "Hello"
      ws.Cells(1,2).Value = "World"

      'Close the workbook
      wb.Close
      Set wb = Nothing
 End Sub

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).