Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个表单,它有 12 个按顺序命名的对象:object0、object1、object2... 我想做一个类似循环的事情来获取所有值,而不是为每个值做同样的事情。
喜欢:
self["object" + i]
在 i 是当前数字的循环中
你可以参考我:
Me("Object" & i)
当代码在表单的模块中运行时。或其他地方:
Forms!TheFormName.Controls("Object" & i)
甚至
Forms.Value