- ©«¤l
- 231
- ¥DÃD
- 55
- ºëµØ
- 0
- ¿n¤À
- 293
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- KEELUNG
- µù¥U®É¶¡
- 2010-7-24
- ³Ì«áµn¿ý
- 2018-8-28
|
LISTBOXªºCOLUMNSWIDTH·|¥X²{¿ù»~°T®§©O¡H
¦U¦ì¤j¤j¦n¡G
¤p§Ì·Q¾Ç²ßLISTBOXªºCOLUMNSWIDTH
¨Ãª½±µ¤Þ¥ÎOFFICE»¡©ú¤ºªº½d¨Ò¡C
¤µ°õ¦æ¸Ó½d¨ÒªºCOMMAND¤§«á·|¥X²{¦p¤Uªº¿ù»~°T®§¡C
¤p§Ì¥Ø«e¬O¨Ï¥ÎOFFICE PROFESSIONAL 2010ªºª©¥»¡C
»yªk¦p¤U¡G
Dim MyArray(2, 3) As String
Private Sub CommandButton1_Click()
'ColumnWidths requires a value for each column
'separated by semicolons
ListBox1.ColumnWidths = TextBox1.Text & ";" _
& TextBox2.Text & ";" & TextBox3.Text
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As _
MSForms.ReturnBoolean)
'ColumnWidths accepts points (no units), inches
'or centimeters; make inches the default
If Not (InStr(TextBox1.Text, "in") > 0 Or _
InStr(TextBox1.Text, "cm") > 0) Then
TextBox1.Text = TextBox1.Text & " in"
End If
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As _
MSForms.ReturnBoolean)
'ColumnWidths accepts points (no units), inches
'or centimeters; make inches the default
If Not (InStr(TextBox2.Text, "in") > 0 Or _
InStr(TextBox2.Text, "cm") > 0) Then
TextBox2.Text = TextBox2.Text & " in"
End If
End Sub
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'ColumnWidths accepts points (no units), inches or
'centimeters; make inches the default
If Not (InStr(TextBox3.Text, "in") > 0 Or _
InStr(TextBox3.Text, "cm") > 0) Then
TextBox3.Text = TextBox3.Text & " in"
End If
End Sub
Private Sub UserForm_Initialize()
Dim i, j, Rows As Single
ListBox1.ColumnCount = 3
Rows = 2
For j = 0 To ListBox1.ColumnCount - 1
For i = 0 To Rows - 1
MyArray(i, j) = "Row " & i & ", Column " & j
Next i
Next j
'Load MyArray into ListBox1
ListBox1.List() = MyArray
'1-inch columns initially
TextBox1.Text = "1 in"
TextBox2.Text = "1 in"
TextBox3.Text = "1 in"
End Sub
ÁÂÁ¦U¦ì¤j¤j¡C |
-
-
TEST-AA.rar
(10.82 KB)
|