Access VBA List all control names on all forms in Excel
Hi
What Access VBA code would I use to generate a list of all the control names on all forms in Access and export this list to Excel
Thanks
Microsoft AccessVBA
Last Comment
John Tsioumpris
8/22/2022 - Mon
Ryan Chong
probably you could try like this:
Function test() Dim Sheet As Worksheet, Ctrl As Object For Each Sheet In Worksheets For Each Ctrl In Sheet.OLEObjects Debug.Print Sheet.Name & ": " & Ctrl.Name Next For Each Ctrl In Sheet.Shapes Debug.Print Sheet.Name & ": " & Ctrl.Name Next NextEnd Function
Are you trying to export a list of ACCESS form controls to an excel spreadsheet?
Or are you trying to list EXCEL userform controls in excel, but doing it from access?
I'm confused about your question, as both excel and Access have userforms and controls.
Murray Brown
ASKER
Hi Anders. Yes to your first question "Are you trying to export a list of ACCESS form controls to an excel spreadsheet? "
My original question was badly worded
Open in new window