Public Function atIsitMDE() As Byte- f! I! p# C2 x6 o
On Error Resume Next
9 G' o3 b4 Z I: m% X9 C Dim dbs As Object
: H+ J- J* z0 p8 F+ w5 Z* p Dim strMDE As String
) D4 p2 F% i+ B5 Y9 Z If Application.CurrentProject.ProjectType = acADP Then+ q! K0 p, G, P8 x4 }4 a
Set dbs = Application.CurrentProject. e( c9 i+ m/ k" f z! d' J% u
Else0 _" D2 L; `4 d1 r( b1 r
Set dbs = CurrentDb()
0 L) O- j6 n, x- K# K End If
. q! R3 o; \( T" I( p9 t$ P1 B* l strMDE = dbs.Properties("MDE")7 D- y$ A: q, T% M1 ~ e P" ]
If Err = 0 And strMDE = "T" Then
* V7 h) ^; m# x/ }9 W3 B atIsitMDE = 1* z7 v& Q( \; A. L- F
Else$ b9 i6 P' X) b
atIsitMDE = 0
3 J0 E* H$ @# ], V' }0 w End If
* i0 T& }& [- v& O% P# Z6 { Set dbs = Nothing( s, ^0 Z2 `; p4 H
End Function |