i have two udts that I would like to combine using conditional compilation. I have tried multiple methods and search the web to no avail. Below is a sample of the two types i need to combine (note the real UDTs are DEVMODE APIs and 30+ lines long, just using this sample to make it easier to follow)
Type Test1
test1 As Long
test2 As String
test3 As Integer
End Type
Type TestAdd1
test4 As String
test5 As Integer
End Type
The result I would like to achieve after combining the two types would be:
Type Test1
test1 As Long
test2 As String
test3 As Integer
test4 As String
test5 As Integer
End Type
There are actually 4 types of TestAdds - TestAdd1, TestAdd2 ect. The one that gets added to the bottom of Test1 is based on a conditional complie statement - I have that part working - I just can't figure out how to put TestAdd1 on the bottom of Test1. I have a work around of defining 4 different types, each one starting off with Test1 and then followed by each of the TestAdds but that adds over 100 lines of code and doesn't seem like good programing practice to me.
So is there any way to combine the two types?
Thanks in advance,
Tom
Bookmarks