- ©«¤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
|
¦^´_ 28# willy1205 - Option Explicit
- Sub RoundedRectangle1_Click()
- Dim NewRow As Integer, E As Range, Sh As Worksheet
- Set Sh = Worksheets("Sheet1") 'Åܼƫü©w¬°¤u§@ªí **¤U±ªºµ{¦¡½X¦p¦³§ó§ï ¤u§@ªí **§ï³oÅܼƥi¬Ù³Â·Ð
- 'Worksheets("sheet1").Range("B8").Value 'ºÞ¥L¬O ¥Ò§g,¤A§g,¤þ§g ¥un³o¤u§@ªí(¦WºÙ)¦³¦b¬¡¶Ã¯¤¤,
- For Each E In Sh.Range("B8,B10") '¾É¤JB8,B10 ªºÀx¦s®æ
- '§PÂ_ ¥D¿ì,¨ó¿ì ªº¦C¸¹
- If E.Address = "$B$8" Then '¥D¿ì
- NewRow = Sh.Range("J34").Value
- Else '¨ó¿ì
- NewRow = Sh.Range("J35").Value
- End If
-
- With Worksheets(E.Value) 'E.Value ªº¤u§@ªí
- .Cells(NewRow, 1) = Sh.Range("C5")
- .Cells(NewRow, 2) = Sh.Range("C6").Value
- .Cells(NewRow, 3) = Sh.Range("I12").Value
- .Cells(NewRow, 4) = Sh.Range("I13").Value
- .Cells(NewRow, 6) = Sh.Range("G22").Value
- '§PÂ_¥D¿ì,¨ó¿ì n§ïÅܪº¦ì¸m¦C¸¹
- If E.Address = "$B$8" Then '¥D¿ì
- .Cells(NewRow, 7) = Sh.Range("H30")
- Else '¨ó¿ì
- .Cells(NewRow, 7) = Sh.Range("H32")
- End If
- End With
- Next
- MsgBox "New Data added", vbOKOnly, "Data"
- End Sub
½Æ»s¥N½X |
|