Hello,
I have a problem where by wish to instantiate an object say NewReport
to a
specific class, all inherited from the base class MyReport, I have the
classname as a string and I don't want to use a massive Case Statement, I
wish to use Reflection as this is more efficient. This is how I would do it
in a case statement, how can I do it in reflection
Dim NewReport as MyReport
Select Case strReportName
Case = "OrderReport"
NewReport = New OrderReport 'Inherits MyReport
Case = "InvoiceReport"
NewReport = New InvoiceReport 'Inherits MyReport
The list is very long, I wish to just pass the string strReportName to
reflection and
reflection will get the correct class
Thanx in advance
Geri