I create a command button array using the following code, but currently the code is preset to 24 buttons. I'm trying to expand the code so that I can create a grid with x amount of buttons, specified by the user in the format 5x2, 4x6 etc.
Yet for the life of me I can't figure out how to do it, could someone please have a look at the code and advise - cheers!
-adehh
m_CurrScore.lSize = 23
VB Code:
For l = 0 To m_CurrScore.lSize If l > cmdBlock.UBound Then Call Load(cmdBlock(l)) cmdBlock(l).Caption = m_sChrs(l) cmdBlock(l).Visible = True cmdBlock(l).Top = (((cmdBlock(l).Height + 10) * Int(l Mod 4)) + 8) cmdBlock(l).Left = (((cmdBlock(l).Width + 10) * Int(l / 4)) + 8) Next l




Reply With Quote