ActiveX - Microsoft Spreadsheet - How to open specific file?

I've been trying to create an object that will allow me to have a reference spreadsheet open on my desktop. I'm able to get the object with the Microsoft Spreadsheet ActiveX control to be on the desktop, however, I just don't know enough about the script to make it work. As of right now, it won't run and open the specified excel file. Here is the code I entered:

Sub Object_OnScriptEnter
Control.Workbooks.Open Filename:="C:\My Documents\Spare_Brain My Documents\DIPRC.xls"
End Sub

Apparently, " Control.Workbooks.Open Filename:= " is not the correct code because DX tells me it is in error and I have to disable it. Does anyone know how to do this or can point me to a good reference to figure out the correct script to open a specific file?

Thanks,
SCott
2,722 views 0 replies