Forum Discussion
MichaelB200
Oct 30, 2024Copper Contributor
Opening Excel from an Access Command Button
I am trying to open the MS Excel Application from a Command Button in Access. the Code I am using is Private Sub MicrosoftExcel_Click() Dim App As Object Set App = CreateObject("exce...
- Oct 31, 2024
MichaelB200 , you Add a Workbook so it will stay open:
Private Sub MicrosoftExcel_Click() Dim App As Object Set App = CreateObject("excel.Application") 'arnelgp App.Workbooks.Add App.Visible = True End Sub
MichaelB200
Oct 31, 2024Copper Contributor
arnel_gp What if I wanted to open an existing workbook?
arnel_gp
Nov 01, 2024Iron Contributor
MichaelB200 remove the adding of workbook, but instead Open the existing workbook:
..
..
App.Workbooks.Open "thePath + filename of your excel file here"
..
..