VBA Code for Forms

Oorang

Well-known Member
Joined
Mar 4, 2005
Messages
2,071
Is there a way to interact with a form without opening it? (Ex getting all the control names)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I don't actually think so, but I'm not 100% sure.:eek:

I used to have code to go through every form in a database to change captions/labels etc on forms.

That was for Access 97 and I'm sure I needed to open the forms in design mode.

Now perhaps that's changed in later versions?

I'm afraid I lost the code some time ago but I'll see if I can find it again.

I know it's not on this machine, but perhaps I've posted it in some forum.

BTW what is it you are actually trying to do?
 
Upvote 0
I inherited a database with literally thousands of tables, queries, forms, macros, etc. So I wrote up some code that will crawl the database and print out what is dependant on what so I know what is safe to delete and then I will start my redesign. However to do that acuratly I had to recursivly loop through every control in every subform (or subreport) and I was trying to avoid having to open the objects to do that. It's functional the way it is, but I was just trying to refine it becuase some of the forms have nested subforms 5 or 6 layers deep and the load time is high.
 
Upvote 0
I'm afraid that to me that sounds like the only way to proceed.

Is it a one off deal?
 
Upvote 0
Well yes and no. Given my line of work, the ability to document a database like this is valuable enough that I could see the code being used repeatedly.
 
Upvote 0
Well if it's a documentation thing I think you should just probably stick with opening etc.

I know it'll probably be a pain but I can't think of any other way.:)

I used to have a database that was solely code for this sort of thing, but I've lost it somewhere.

Why not create such a database?
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,749
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top