Hi,
I want to show an excel-graphs in one of my access-forms.
The problem is how to refer to an embedded excel-file in my form.
I can refer to an external excelfile (see below) an do some test stuff
in this file but how can I do the same thing in an embedded Xls-file
like "Forms![frmTestForm]![OLEUnbound77]" ?
'open the workbook
Workbooks.Open filename:="C:\Test stuff\temp.xls"
'select sheet "Data"
ActiveWorkbook.Sheets("Data").select
'select whole sheet
Cells.select
'Clear the sheet
Selection.ClearContents
'For example, write "testing" in cell A1
Range("A1")= "testing"
'Save the workbook
ActiveWorkbook.Save
'and exit
ActiveWorkbook.Close
Replies please in this newsgroup
If you want to mail me:
Replace the nul in the adress by a zero.