G
Guest
I need to open Excel from Access and place various values in various cells in
an existing Excel spreadsheet. My code below does not work. I commented off
my attempts. Can you help me correct what I am doing wrong. Thanks so much.
-Beverly
Set xlbook = xlApp.Workbooks.Open("E:\Trading System\Database\Excel
Spreadsheets\AUD-JPY_LstGrp_Calc.xls", 3)
'
'set xlsheet = xlbook.worksheets.("jpy-aud")
' Place some text in the cell a130 of the sheet.
'xlsheet.Cells(1, 130).Value = "This is column A, row 130"
xlApp.Application.Visible = True
xlApp.Cells(1, 130).Value = "This is column A, row 130"
xlbook.Save
xlbook.Close
Set xlsheet = Nothing
xlApp.Quit
Set xlApp = Nothing
Set xlbook = Nothing
End Sub
an existing Excel spreadsheet. My code below does not work. I commented off
my attempts. Can you help me correct what I am doing wrong. Thanks so much.
-Beverly
Set xlbook = xlApp.Workbooks.Open("E:\Trading System\Database\Excel
Spreadsheets\AUD-JPY_LstGrp_Calc.xls", 3)
'
'set xlsheet = xlbook.worksheets.("jpy-aud")
' Place some text in the cell a130 of the sheet.
'xlsheet.Cells(1, 130).Value = "This is column A, row 130"
xlApp.Application.Visible = True
xlApp.Cells(1, 130).Value = "This is column A, row 130"
xlbook.Save
xlbook.Close
Set xlsheet = Nothing
xlApp.Quit
Set xlApp = Nothing
Set xlbook = Nothing
End Sub