columnA columnB columnC
a b c
d e f
h i g
问题:
1、如何将标题显示中文?
如:columnA->名称
2、怎么样才能显示每一行数据的行号?
如:1 a b c
2 a b c
3、如何取一个数据值?
如:想取第3行第3列的值“f”
4、我现在点击一行,只能让一个cell格高亮显示,怎样才能让一行都高亮显示?
5、在程序脚本里加注释用',如果想多行都注释,应该怎样做?不会一行一行的加'吧?
6、如果脚本语句出现错误,难道只能在运行程序的时候检测出来吗?不能在运行前检测吗?
7、在vb里在打开一个窗口时能不能传递变量?在关闭一个窗口时返回变量?如果能,脚本怎么写?
7 个解决方案
#1
1。设置:属性里可以手动直接设置
代码:msgrid.textmatrix(0,1)="你好"
代码:msgrid.textmatrix(0,1)="你好"
#2
2.msgrid.textmatrix(msgrid.row,0)=msgrid.row
3. dim a as string
a=msgrid.textmatrix(2,3) '你的行里应该是2
4.selectionmodal属性设置为1
3. dim a as string
a=msgrid.textmatrix(2,3) '你的行里应该是2
4.selectionmodal属性设置为1
#3
' Set column headers.
Private Sub Form_Load()
On Error GoTo Ex
With MSFlexGrid1
.FormatString = "<行号|<中国 |<日本鬼子 |<China |>Janpanese pig "
End With
Exit Sub
Ex:
End Sub
Private Sub Form_Load()
On Error GoTo Ex
With MSFlexGrid1
.FormatString = "<行号|<中国 |<日本鬼子 |<China |>Janpanese pig "
End With
Exit Sub
Ex:
End Sub
#4
5.全选后,用设置注释块,工具栏(菜单栏下面的)里的标准中。
6.语法错误会运行前提示
7.在module中声明全局变量
Public a As String
6.语法错误会运行前提示
7.在module中声明全局变量
Public a As String
#5
5、多行注释很容易,但我可能讲起来比较麻烦,建议查一下资料看看。
6、在运行前不能检查错误
7、通过窗体变量或属性实现
6、在运行前不能检查错误
7、通过窗体变量或属性实现
#6
i sugguest you install MSN! Many questions you asked,have refered to. Good luck!
Private Sub Form_Load()
On Error GoTo Ex
Dim f_intRow As Integer
With MSFlexGrid1
.FormatString = "<行号|<中国 |<日本鬼子 |<China |>Janpanese pig "
.Rows = 4
For f_intRow = 1 To .Rows
.TextMatrix(f_intRow, 0) = f_intRow
.TextMatrix(f_intRow, 1) = "aaa" & f_intRow
.TextMatrix(f_intRow, 2) = "bbb" & f_intRow
.TextMatrix(f_intRow, 3) = "ccc" & f_intRow
.TextMatrix(f_intRow, 4) = "ddd" & f_intRow
Next
End With
Exit Sub
Ex:
End Sub
#7
sorry it's MSDN, not MSN!
#1
1。设置:属性里可以手动直接设置
代码:msgrid.textmatrix(0,1)="你好"
代码:msgrid.textmatrix(0,1)="你好"
#2
2.msgrid.textmatrix(msgrid.row,0)=msgrid.row
3. dim a as string
a=msgrid.textmatrix(2,3) '你的行里应该是2
4.selectionmodal属性设置为1
3. dim a as string
a=msgrid.textmatrix(2,3) '你的行里应该是2
4.selectionmodal属性设置为1
#3
' Set column headers.
Private Sub Form_Load()
On Error GoTo Ex
With MSFlexGrid1
.FormatString = "<行号|<中国 |<日本鬼子 |<China |>Janpanese pig "
End With
Exit Sub
Ex:
End Sub
Private Sub Form_Load()
On Error GoTo Ex
With MSFlexGrid1
.FormatString = "<行号|<中国 |<日本鬼子 |<China |>Janpanese pig "
End With
Exit Sub
Ex:
End Sub
#4
5.全选后,用设置注释块,工具栏(菜单栏下面的)里的标准中。
6.语法错误会运行前提示
7.在module中声明全局变量
Public a As String
6.语法错误会运行前提示
7.在module中声明全局变量
Public a As String
#5
5、多行注释很容易,但我可能讲起来比较麻烦,建议查一下资料看看。
6、在运行前不能检查错误
7、通过窗体变量或属性实现
6、在运行前不能检查错误
7、通过窗体变量或属性实现
#6
i sugguest you install MSN! Many questions you asked,have refered to. Good luck!
Private Sub Form_Load()
On Error GoTo Ex
Dim f_intRow As Integer
With MSFlexGrid1
.FormatString = "<行号|<中国 |<日本鬼子 |<China |>Janpanese pig "
.Rows = 4
For f_intRow = 1 To .Rows
.TextMatrix(f_intRow, 0) = f_intRow
.TextMatrix(f_intRow, 1) = "aaa" & f_intRow
.TextMatrix(f_intRow, 2) = "bbb" & f_intRow
.TextMatrix(f_intRow, 3) = "ccc" & f_intRow
.TextMatrix(f_intRow, 4) = "ddd" & f_intRow
Next
End With
Exit Sub
Ex:
End Sub
#7
sorry it's MSDN, not MSN!