I am using VBA to export Access data to an Excel Workbook. The VBA code includes the following:
Ans = MsgBox("Existing Data in " & xWkBkName & " will be replaced. Continue?", vbYesNo, "Data Replacement Warning")
If Ans = vbNo Then Exit Sub
When the program runs, the MsgBox is hidden by the Excel Workbook. How can I ensure that the MsgBox remains visible?
Another problem I have is that while the Excel workbook is being populated, the User can interrupt the operation while selecting an Excel cell. Can I lock Excel while the workbook is being populated to prevent User interruption?
Thank you for any help.
Jim
Ans = MsgBox("Existing Data in " & xWkBkName & " will be replaced. Continue?", vbYesNo, "Data Replacement Warning")
If Ans = vbNo Then Exit Sub
When the program runs, the MsgBox is hidden by the Excel Workbook. How can I ensure that the MsgBox remains visible?
Another problem I have is that while the Excel workbook is being populated, the User can interrupt the operation while selecting an Excel cell. Can I lock Excel while the workbook is being populated to prevent User interruption?
Thank you for any help.
Jim