I am trying to open a specific excel worksheet from an activex button on a word document, however it does not seem to want to work, any help would be appreciated, the code I have tried is:-
Thanks in anticipation of someone helping out on what has been a frustrating 2 hours
Paul
Code:
Private Sub CommandButton161_Click()
Dim oExcel As Excel.Application
Dim oWB As Workbook
Set oExcel = New Excel.Application
Set oWB = oExcel.Workbooks.Open("\\Dfs50620\204723001\workgroup\I Drive\Noticeboard\Leave_2014.xls")
oExcel.Visible = True
Set oWB = oExcel.Workbooks.Open(sPath)
End Sub
Thanks in anticipation of someone helping out on what has been a frustrating 2 hours
Paul