|
楼主 |
发表于 2010-12-24 08:04
|
显示全部楼层
已下的朋友有2个BUG需要更正一下,自己更改
在现金缴款单中打印按钮代码中
Private Sub CommandButton2_Click()
Sheet11.Unprotect ("sjw")
.......
Unload Me
Sheet5.Protect "sjw"
End Sub
sheet5需改为sheet11否则现金交款单又会处于无保护状态
另一个小BUG是在选择模块代码中
Sub 选择()
Dim xx()
Dim zz(0)
WW = Sheet5.ComboBox1.Value
If Sheet5.Cells(7, 7) = "异地" Then
yy = Application.CountIf(Sheet9.Columns(4), "*" & WW & "*")
If yy = 0 Then ComboBox1.List() = zz ReDim xx(yy - 1)
k = -1
For i2 = 6 To Sheet9.[D65536].End(xlUp).Row
If Sheet9.Cells(i2, 4).Value Like "*" & WW & "*" Then
k = k + 1
xx(k) = Sheet9.Cells(i2, 4).Value
End If
Next i2
Sheet5.Cells(7, 15).Value = Sheet5.ComboBox1.Value
Sheet5.ComboBox1.List() = xx
Sheet5.ComboBox1.DropDown
Else
yy = Application.CountIf(Sheet3.Columns(4), "*" & WW & "*")
If yy = 0 Then ComboBox1.List() = zz ReDim xx(yy - 1)
k = -1
For i = 6 To Sheet3.[D65536].End(xlUp).Row
If Sheet3.Cells(i, 4).Value Like "*" & WW & "*" Then
k = k + 1
xx(k) = Sheet3.Cells(i, 4).Value
End If
Next i
Sheet5.Cells(7, 15).Value = Sheet5.ComboBox1.Value
Sheet5.ComboBox1.List() = xx
Sheet5.ComboBox1.DropDown
End If
End Sub
两个 If yy = 0 Then ComboBox1.List() = zz应改为 If yy = 0 Then sheet5.ComboBox1.List() = zz
1楼和2楼附件已更新,如果有的朋友不会改,请重新下载即可
[ 本帖最后由 SSJJWW 于 2010-12-24 08:08 编辑 ] |
|