- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 14# dafa
°}¦C¦r¤¸¤Ó¦h¨S¿ìªk¥þ³¡¶ë¤J²M³æ¤º- Sub ²M³æ©ú²Ó()
- Dim bb, kk(), aa, B As Integer, Rng As Range
- 'kk() °ÊºA°}¦C ¥i¨Ì»Ý¨D«ü©w¤¸¯Àªº¼Æ¶q , kk(30) :¦³31Ó¤¸¯À (0 To 30 )
- 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
- B = 0 '°ÊºA°}¦Cªº¼Æ¥Ø: ¦¹®É °ÊºA°}¦C©|¥¼«ü©w¤¸¯À¼Æ¥Ø
- For i = 1 To g
- e = Worksheets("²M³æ©ú²Ó").Cells(i, 2)
- If Worksheets("²M³æ©ú²Ó").Cells(i, 2) = aa Then
- j = Worksheets("²M³æ©ú²Ó").Cells(i, 34).End(xlToLeft).Column
- For a = 3 To j
- ReDim Preserve kk(B) 'ReDim ³¯z¦¡ ¦bµ{§Ç¼h¦¸¤¤¥Î¨Ó«·s°t¸m°ÊºA°}¦CÅܼƪºÀx¦sªÅ¶¡¡C
- 'Preserve ¿ï¾Ü©Ê¤Þ¼Æ¡C·í§ïÅÜ즳°}¦C³Ì«á¤@ºûªº¤j¤p®É¡A¤´µM«O¦³ì¨Óªº¸ê®ÆªºÃöÁä¦r¡C
- 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»¡©ú"
- Set Rng = activecells
- ActiveCell.Cells(, 4).Select
- ActiveCell = ""
- With Rng.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 = Nothing 'kk ¬O°}¦C ¤£¬Oª«¥ó
- ActiveCell.Offset(, -5) = Date
- ActiveCell.Offset(, 1) = Environ("UserName")
- End Sub
½Æ»s¥N½X |
|