-Hello
-I want to summarize this code because it is too long:
Dim Ad2 As Object
Dim Ad3 As Object
Dim Ad4 As Object
Dim Ad5 As Object
Dim Ad6 As Object
Dim Ad7 As Object
Dim Ad8 As Object
Dim Ad9 As Object...
-To: Dim Ad268 As Object . Tanks!.. :)
Printable View
-Hello
-I want to summarize this code because it is too long:
Dim Ad2 As Object
Dim Ad3 As Object
Dim Ad4 As Object
Dim Ad5 As Object
Dim Ad6 As Object
Dim Ad7 As Object
Dim Ad8 As Object
Dim Ad9 As Object...
-To: Dim Ad268 As Object . Tanks!.. :)
This shouldn't be posted to the Codebank section, but you are looking for either an array or a Collection.
Array version:
You can then refer to items in the array as follows:Code:Dim Ad(2 To 268) As Object
Or you can create a Collection object and add as many other objects to it as you like.Code:Ad(2).SomeProperty = "Some Value"
Welcome to VBForums :wave:
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'VB6 and earlier' forum