ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check If Form Open or Not (https://www.excelbanter.com/excel-programming/407211-check-if-form-open-not.html)

kirkm[_7_]

Check If Form Open or Not
 
I'm prety sure this is Access code

Function IsOpen(szName As String)
IsOpen = (SysCmd(acSysCmdGetObjectState, acForm, szName) < 0)
End Function

Anyone know the Excel equivalent?

Thanks - Kirk

Bob Phillips

Check If Form Open or Not
 
Function IsLoaded(szName As String)
Dim frm As Object
For Each frm In UserForms

If frm.Name = szName Then

IsLoaded=True
Exit For
End If
Next frm
End Function

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"kirkm" wrote in message
...
I'm prety sure this is Access code

Function IsOpen(szName As String)
IsOpen = (SysCmd(acSysCmdGetObjectState, acForm, szName) < 0)
End Function

Anyone know the Excel equivalent?

Thanks - Kirk




kirkm[_7_]

Check If Form Open or Not
 

Thanks Bob, That did it brilliantly.

Cheers - Kirk


All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com