Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Control in MSFlexGrid

Status
Not open for further replies.

RWF

Programmer
Apr 16, 2001
24
US
I'va doen some research on this and I am fairly sure it is possible, but the exact technique is escaping me.

I would like to place a command button in a cell in a MSFlexGrid control.

This is a condensed version of what I have:

-----------------------
Dim cmdViewTable As VB.CommandButton
Set cmdViewTable = Controls.Add("VB.CommandButton", _
"cmdViewTable")

MSFlexGrid1.AddItem ""
MSFlexGrid1.TextMatrix(1, 1) = cmdViewTable
-------------------------

The columns property of the MSFlexGrid1 control is 1, and I get a "Run-time error '381': Subscript out of Range" error.
 
I believe that if you have 1 column then the column index is 0, same for rows
 
Arrghhhh! I got here too late! Just after I took a break and sat down I saw it right away.
 
Haha! Most amusing!

Now, perhaps one you can tell me how to get the button to show in the cell.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top