Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default How check if form is loaded?

Hi,

is it possible to check if a specific form is loaded into memory?

Thanks,
Jos Vens


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default How check if form is loaded?


"Jos Vens" wrote in message
...
Hi,

is it possible to check if a specific form is loaded into memory?

Thanks,
Jos Vens



It's possible to test whether a form is being shown. That's perhaps not what
you meant.

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default How check if form is loaded?

Hi Fredrik,

yes it is, I just want to test if a form is shown or not but how?

Thanks
Jos

"Fredrik Wahlgren" schreef in
bericht ...

"Jos Vens" wrote in message
...
Hi,

is it possible to check if a specific form is loaded into memory?

Thanks,
Jos Vens



It's possible to test whether a form is being shown. That's perhaps not
what
you meant.

/Fredrik




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default How check if form is loaded?

Hi Jos,

Private Function FormIsLoaded(UFName As String) As Boolean
Dim UF As Integer
For UF = 0 To VBA.UserForms.Count - 1
FormIsLoaded = UserForms(UF).Name = UFName
If FormIsLoaded Then Exit Function
Next UF
End Function

Sub Test()
'Load UserForm1
MsgBox FormIsLoaded("UserForm1"), 64
'If FormIsLoaded("UserForm1") Then Unload UserForm1
End Sub

Regards,
MP

"Jos Vens" a écrit dans le message de
...
Hi,

is it possible to check if a specific form is loaded into memory?

Thanks,
Jos Vens



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default How check if form is loaded?

Thanks a lot Michel!

Your code does the job I wanted,

Jos


"Michel Pierron" schreef in bericht
...
Hi Jos,

Private Function FormIsLoaded(UFName As String) As Boolean
Dim UF As Integer
For UF = 0 To VBA.UserForms.Count - 1
FormIsLoaded = UserForms(UF).Name = UFName
If FormIsLoaded Then Exit Function
Next UF
End Function

Sub Test()
'Load UserForm1
MsgBox FormIsLoaded("UserForm1"), 64
'If FormIsLoaded("UserForm1") Then Unload UserForm1
End Sub

Regards,
MP

"Jos Vens" a écrit dans le message de
...
Hi,

is it possible to check if a specific form is loaded into memory?

Thanks,
Jos Vens





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
make a check form, and then have info go to a check register richie g Excel Worksheet Functions 0 May 5th 10 12:10 AM
Check Box and form Sharlene Administrative Assistant Excel Discussion (Misc queries) 0 June 3rd 09 06:47 PM
form check box sako 338 Excel Worksheet Functions 1 January 16th 07 12:33 PM
Help! Animated gif-image in form does not show animation when form loaded JoCa Excel Programming 4 September 23rd 04 07:43 PM
Help creating a check box on a form. artemisia Excel Programming 8 May 25th 04 06:24 PM


All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"