风,按照你的提示我写了代码,可是提示我红色字段错误
请问错在哪里??
Dim hintNO As Integer
Dim i As String
Dim j As String
Dim x As String
Dim y As Integer
Dim z1() As String
Dim z2() As String
Private Sub addhint_Click()
hintNO = hintNO + 1
Load hint(hintNO)
hint(hintNO).Caption = "信息" & hintNO
Form1.Show
End Sub
Private Sub blue_Click()
red.Checked = False
green.Checked = False
blue.Checked = True
defaultcolor.Checked = False
Form4.BackColor = vbBlue
End Sub
Private Sub defaultcolor_Click()
red.Checked = False
green.Checked = False
blue.Checked = False
defaultcolor.Checked = True
Form4.BackColor = &H8000000F
End Sub
Private Sub docfile_Click()
txtfile.Checked = False
jpgfile.Checked = False
exefile.Checked = False
pdhfile.Checked = False
docfile.Checked = True
elxfile.Checked = False
File1.Pattern = "*.doc"
End Sub
Private Sub ELXfile_Click()
txtfile.Checked = False
jpgfile.Checked = False
exefile.Checked = False
pdhfile.Checked = False
docfile.Checked = False
elxfile.Checked = True
File1.Pattern = "*.elx"
End Sub
Private Sub EXEfile_Click()
txtfile.Checked = False
jpgfile.Checked = False
exefile.Checked = True
pdhfile.Checked = False
docfile.Checked = False
elxfile.Checked = False
File1.Pattern = "*.exe"
End Sub
Private Sub Form_Load()
Drive1.Drive = "d:"
Dir1.Path = "D:\ttt\个人文件夹\收件箱"
red.Checked = False
green.Checked = False
blue.Checked = False
defaultcolor.Checked = False
txtfile.Checked = False
jpgfile.Checked = False
exefile.Checked = False
pdhfile.Checked = False
docfile.Checked = False
elxfile.Checked = False
File1.Pattern = "*.*"
End Sub
Private Sub green_Click()
red.Checked = False
green.Checked = True
blue.Checked = False
defaultcolor.Checked = False
Form4.BackColor = vbGreen
End Sub
Private Sub JPGfile_Click()
txtfile.Checked = False
jpgfile.Checked = True
exefile.Checked = False
pdhfile.Checked = False
docfile.Checked = False
elxfile.Checked = False
File1.Pattern = "*.jpg"
End Sub
Private Sub PDHfile_Click()
txtfile.Checked = False
jpgfile.Checked = False
exefile.Checked = False
pdhfile.Checked = True
docfile.Checked = False
elxfile.Checked = False
File1.Pattern = "*.pdh"
End Sub
Private Sub red_Click()
red.Checked = True
green.Checked = False
blue.Checked = False
defaultcolor.Checked = False
Form4.BackColor = vbRed
End Sub
Private Sub removehint_Click()
If hintNO <= 0 Then
Exit Sub
Else
Unload hint(hintNO)
hintNO = hintNO - 1
End If
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
i = File1.List(File1.ListIndex)
If UCase(Right(i, 4)) = ".TXT" Then
Open (File1.Path & "\" & i) For Input As #1
Do While Not EOF(1)
Line Input #1, j
j = Text & j & vbCrLf
Loop
Close #1
j = Replace(j, ".a", ".speed")
j = Replace(j, ".b", ".high")
j = Replace(j, ".c", ".weigth")
j = Replace(j, "*", vbCrLf & "")
End If
RichTextBox1.Text = j
z1() = Split(j, ",")
z2() = Split(z1(), ":")
MSFlexGrid2.TextMatrix() = z2()
End Sub
Private Sub TXTfile_Click()
txtfile.Checked = True
jpgfile.Checked = False
exefile.Checked = False
pdhfile.Checked = False
docfile.Checked = False
elxfile.Checked = False
File1.Pattern = "*.txt"
For y = 0 To File1.ListCount - 1
x = File1.List(y)
If UCase(Right(x, 4)) = ".TXT" Then
File1.Pattern = x
End If
Next y
End Sub