M
Maperalia
I am using the windows message "PLEASE WAIT" while the macro is doing its
work. The situation is that this macro is started in Excel and does the
following:
1.- Reads cell i data in excel
2.- Open AutoCAD software to update the dimensions which are the data taken
from the excel cells.
The problem is when the AutoCAD software opens (see statement to open the
AutoCAD software below which is located in the excel macro). The window
message stays behind this software because it is running in excel software.
How can I make the window message appear in front of the AutoCAD software
when is open?
Thanks in Advance.
Maperalia
'#### START MACRO TO OPEN AUTOCAD SOFTWARE ###############
If Err Then Err.Clear
On Error Resume Next
Set oAcadApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set oAcadApp = CreateObject("AutoCAD.Application")
If Err Then
MsgBox "Could not connect to AutoCad"
Exit Sub
End If
End If
oAcadApp.Visible = True
oAcadApp.WindowState = acMax
oAcadApp.ZoomExtents
'**** Start Open AutoCAD File ********************************
Set oAcadDoc = oAcadApp.Documents.Open("C:\Paper\" & NewDir & "\" & WO1 &
".DWG")
oAcadApp.Visible = True
oAcadApp.WindowState = acMax
oAcadApp.ScreenUpdating = False
oAcadApp.ZoomExtents
'**** End Open AutoCAD File ********************************
'#### END MACRO TO OPEN AUTOCAD SOFTWARE ###############
work. The situation is that this macro is started in Excel and does the
following:
1.- Reads cell i data in excel
2.- Open AutoCAD software to update the dimensions which are the data taken
from the excel cells.
The problem is when the AutoCAD software opens (see statement to open the
AutoCAD software below which is located in the excel macro). The window
message stays behind this software because it is running in excel software.
How can I make the window message appear in front of the AutoCAD software
when is open?
Thanks in Advance.
Maperalia
'#### START MACRO TO OPEN AUTOCAD SOFTWARE ###############
If Err Then Err.Clear
On Error Resume Next
Set oAcadApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set oAcadApp = CreateObject("AutoCAD.Application")
If Err Then
MsgBox "Could not connect to AutoCad"
Exit Sub
End If
End If
oAcadApp.Visible = True
oAcadApp.WindowState = acMax
oAcadApp.ZoomExtents
'**** Start Open AutoCAD File ********************************
Set oAcadDoc = oAcadApp.Documents.Open("C:\Paper\" & NewDir & "\" & WO1 &
".DWG")
oAcadApp.Visible = True
oAcadApp.WindowState = acMax
oAcadApp.ScreenUpdating = False
oAcadApp.ZoomExtents
'**** End Open AutoCAD File ********************************
'#### END MACRO TO OPEN AUTOCAD SOFTWARE ###############