I'm using control array to create controls at runtime on a tabstrip. I have a command button on the form with index = 0 and I create more buttons using
iNextBtn = btnClose.Count
.caption = "&Close"
.Tag = sNamedCell
Set .Container = Controls(sNamedFrame)
and when the tab has to be closed, I unload the button with
However, when I unload the button with index say 1 and then subsequently try to load the button with the same Index, I get a runtime error that the item is already locked. I'd like to know why this happens. I can find a way to work around this, but I'd like to understand why I get the runtime error.