Drofidnas
Board Regular
- Joined
- Jun 30, 2004
- Messages
- 126
Hi
I have the following macro which opens an external file.
I want the user to be able to edit it and save it and then in the parent Excel file again be given the choice to re-import those changes.
As it stands, the file opens but I get the dialog up first before focusing on the opened file. How can I force the focus or delay the dialog box?
Thanks for any help
Chris
Sub Open_Nat_Dem_331()
On Error Resume Next
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Define Source Workbook
DMRLSource = "\Nat Dem 331 01-05-14.xlsx"
SheetSource = "Template"
'Open Source Workbook and correct tab
Workbooks.Open Filename:=DMRLSource
Workbooks(DMRLSetup).Activate
Sheets(SheetSource).Select
Ans = MsgBox("Do you want to re-import the DMRL data for " & DMRLSource & "?", vbQuestion + vbYesNo)
Select Case Ans
Case vbYes
Call Data_Import_Nat_Dem_331
Case vbNo
Exit Sub
End Select
End Sub
I have the following macro which opens an external file.
I want the user to be able to edit it and save it and then in the parent Excel file again be given the choice to re-import those changes.
As it stands, the file opens but I get the dialog up first before focusing on the opened file. How can I force the focus or delay the dialog box?
Thanks for any help
Chris
Sub Open_Nat_Dem_331()
On Error Resume Next
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Define Source Workbook
DMRLSource = "\Nat Dem 331 01-05-14.xlsx"
SheetSource = "Template"
'Open Source Workbook and correct tab
Workbooks.Open Filename:=DMRLSource
Workbooks(DMRLSetup).Activate
Sheets(SheetSource).Select
Ans = MsgBox("Do you want to re-import the DMRL data for " & DMRLSource & "?", vbQuestion + vbYesNo)
Select Case Ans
Case vbYes
Call Data_Import_Nat_Dem_331
Case vbNo
Exit Sub
End Select
End Sub
Last edited: