Wondering if this is possible - I've tried a few ways - and if it is possible - I keep getting the syntax wrong.
.
.
.
Dim sbpnl As StringBuilder
sbpnl.Initialize
sbpnl.Append("pnl").Append(aValue)
Dim thePanel As Panel
thePanel=sbpnl
.
.
.
I run into the problem on the very last line during compile - where it takes the string builder into thePanel - I'm not sure if that sort of conversion is possible.
I can't understand what you are trying to do. Assigning a StringBuilder object to a Panel variable is just not going to work! By the way, you didn't Initialize the Panel.
The next block of code not pasted in my example initializes the panel, adds the view etc...
I was looking to take a value (aValue) and display from variety of possible panels based on what aValue contains. (Prefixed with the "pnl" - although that isn't entirely necessary)
I'm afraid that I still don't understand what you are trying to do. I think you have a misunderstanding of what object variables are and how to use them.
I was simply trying to invoke one of many panels with a variable for the panel name (thePanel), rather than expicitly calling each panel (pnl01,pnl02,pnl03...).
I used the same Stringbuilder technique elsewhere in code to call subs/maintain current position in the app working fine. Just playing around and testing to see if it worked with a panel to reduce lines of code....