Open Excel Documents from access form

M

Matty_b

I am trying to open an Excel document using a combo box to select the
document from the list and then click run and the document opens in Excel, Is
there a code that will allow me to do this,

Thanks
 
J

JohnFol

Make a reference to the Excel object library and try:

Dim objExcel As Excel.Application
Set objExcel = New Excel.Application
objExcel.Workbooks.Open (Me!ComboBoxValue)
objExcel.Visible = True
 
Top