I need help . ( who doesn't..)
how can i do this thing:
through vb app.
open an excel document and read the value in a1 cell.
that'all.
have a nice day.
Printable View
I need help . ( who doesn't..)
how can i do this thing:
through vb app.
open an excel document and read the value in a1 cell.
that'all.
have a nice day.
Try This:
VB Code:
Dim appExcel As Excel.Application Set appExcel = New Excel.Application Dim sFileName As String Dim sA1 As String sFileName = "C:\Documents and Settings\Ed\My Documents\Judy.xls" appExcel.Workbooks.Open sFileName Dim actSheet As Excel.Worksheet MsgBox appExcel.ActiveWorkbook.ActiveSheet.Range("A1").Value appExcel.Workbooks(appExcel.ActiveWorkbook.Name).Close appExcel.Quit Set appExcel = Nothing
By the way you'll have to set a reference to the MS Excel Object first.