i was using a routine by a member of this forum to count all of the userforms (any name)
now what i need is a routine that counts all of the userforms named UserForm#.
I have googled this but came up empty.
Can someone help me?
i was using a routine by a member of this forum to count all of the userforms (any name)
now what i need is a routine that counts all of the userforms named UserForm#.
I have googled this but came up empty.
Can someone help me?
Loaded Userforms would be:
![]()
Please Login or Register to view this content.
thanks @bytemarks but it doesn't work. i put a debug.print at the function to tell me whats the number and it just comes in as a "1". but if i run your test (usage) then it reports as "0"
thoughts?
btw,i put the public function in a module at the top where declarations go. is that the problem?
Last edited by dmcgov; 03-08-2019 at 01:59 PM. Reason: where do public functions go
ok, i see where the error is. to run your function, i first have to load all the userforms listed in the project window. that is not what i am looking for. i just want a # of userforms that are not loaded (named UserForm*), can that be done?
It can, but you'll need to tick "Trust access to the VBA project object model" in Trust Center > Macro Settings.
![]()
Please Login or Register to view this content.
thanks @ByteMarks, that did the trick. and yes i had already done the trust access (needed from another macro).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks