Carly
Active Member
- Joined
- Aug 21, 2002
- Messages
- 370
I have got an access database which opens an Excel workbook using the following code:
The Excel workbook as a form which loads when the workbook is opened as follows:
The problem I have got is the Access database just hangs instead of closing until something is done with the form on the excel workbook, which is not what I want to happen...& if I change the form on the Excel spreadsheet to be ShowModal = False, then the excel workbook doesnt seem to open properly.
Is there anything I can do so that it works like, Access Database closes, Excel workbook open as if I was manually doing so?
Code:
With CreateObject("Excel.Application")
.Workbooks.Open "\\stoke\analytic$\Price Increase\MarginRecoveryPlan " & vMonth & "\zPricingExtractManipulation\PricingExtractManipulation-MACRO.xlsm", True
.Visible = True
End With
DoCmd.Close acForm, "FrontPage", acSaveNo
DoCmd.Quit
Code:
Private Sub Workbook_Open()
frmStages.Show
End Sub
Is there anything I can do so that it works like, Access Database closes, Excel workbook open as if I was manually doing so?