- ©«¤l
- 49
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 97
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-8-24
- ³Ì«áµn¿ý
- 2023-12-24
|
¦^´_ 8# GBKEE
¦A½Ð°ÝG¤j¤@¤U
¬°¦ó§ÚªºÄµ§i°T®§¤£·|¥X²{
Sub ²M³æ©ú²Ó()
Dim bb, kk(30), aa
If ActiveCell.Cells.Column <> "4" Then Exit Sub
aa = ActiveCell
If aa = "Account Code " Then Exit Sub
If aa = "" Then Exit Sub
g = Worksheets("²M³æ©ú²Ó").Cells(65536, 2).End(xlUp).Row
For i = 1 To g
e = Worksheets("²M³æ©ú²Ó").Cells(i, 2)
If Worksheets("²M³æ©ú²Ó").Cells(i, 2) = aa Then
b = 0
j = Worksheets("²M³æ©ú²Ó").Cells(i, 34).End(xlToLeft).Column
For a = 3 To j
kk(b) = Worksheets("²M³æ©ú²Ó").Cells(i, a)
b = b + 1
Next a
bb = Join(kk, ",")
Exit For
End If
Next i
pp = Worksheets("²M³æ©ú²Ó").Cells(i, 3)
MsgBox pp, , "Account_Code»¡©ú"
ActiveCell.Cells(, 4).Select
ActiveCell = ""
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=bb
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = "You must enter a number from five to ten"
.ShowInput = True
.ShowError = True
End With
Set kk(30) = Nothing
ActiveCell.Offset(, -5) = Date
ActiveCell.Offset(, 1) = Environ("UserName")
End Sub |
|