南夏墅中心小学:vb 中的msflexgrid 怎样合并列? 我很想知道代码。谢谢大哥大姐了!!

来源:百度文库 编辑:高考问答 时间:2024/04/29 06:52:05

dim intindex as long
'定位在第一行进行操作
msflexgrid.row=0
msflexgrid.col=0
'准备合并单元格
for intindex=1 to 4
msflexgrid.col=intindex
msflexgrid.text="客户表"
next intindex

for intindex=5 to 6
msflexgrid.col=intindex
msflexgrid.text=cstr(date)
next intindex

'单元格允许自由合并
msflexgrid.MergeCells=flexMergeFree
'在第一行进行相邻的、相同文本的单元格合并
msflexgrid.MergeRow(0)=true

你先试一试。