ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Æ»sÀx¦s®æ½d³ò

[µo°Ý] ½Æ»sÀx¦s®æ½d³ò

½Ð±Ð¤j¤j
§Æ±æ«ö¤U"½T©w"«á±Nsheet1.range("E1:N2").value½Æ»s©ósheet2.range("E3:N4")
¥H¤U¬O§Úªºµ{¦¡½X

Private Sub CommandButton8_Click()
Dim b As Integer
Dim k As Integer
Dim c As Integer
Dim d As Integer

henji = MsgBox("½T©w¿é¤J " & Range("A1").Value & "­Ó»sµ{»Ý¨D?", Buttons:=vbYesNo + vbQuestion, Title:="»Ý¨D¼Æ½T»{")

b = Range("A2").Value   
k = Sheet2.Range("A5").Value

If (henji = 6) Then

   c = b
   If b > k Then
      b = b - k
      For i = 1 To b
          Sheet2.Columns("F").Insert
      Next
      
    ElseIf b < k Then
       b = k - b
       For i = 1 To b
            Sheet2.Columns("F").Delete
       Next
   End If
   Sheet2.Range("A5").Value = c
      

   d = 4 + b
   Range(Cells(1, 5), Cells(2, d)).Copy Sheet2.Range("E3")
   
End If
End Sub
¤å¦â¦rÅéµ{¦¡¦b·s¼W¤@¦æ«á·|¥X°ÝÃD¡A½Ð¨D¤j¤jÀ°¦£¬Ý¬Ý­þ¸Ì¥X¿ù¤F¡H¡H

123.rar (25.54 KB)

123.rar (25.87 KB)

123.rar (25.87 KB)

Ä_Ä_

¬O¦]Sheet2.Range("E3")ªº®æ¦¡§a

TOP

.Copyªº¥Îªk¯à±NÀx¦s®æ¦X¨Ö¶Ü¡H¡H
Ä_Ä_

TOP

¦^´_ 3# caichen3

²¤Æ¤@¤Uµ{¦¡
  1. Private Sub CommandButton8_Click()
  2. With Sheet2
  3.   LC = .[IV3].End(xlToLeft).Column
  4.   If LC > 7 Then .Range(.Cells(3, 5), .Cells(4, LC - 3)).Delete Shift:=xlToLeft
  5. End With
  6. With Sheet1
  7.   LC = .[IV2].End(xlToLeft).Column
  8.   .Range(.Cells(1, 5), .Cells(2, LC)).Copy
  9.   Sheet2.Range("E3:E4").Insert Shift:=xlToRight
  10. End With
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# caichen3
    °ÝÃD¦b b = Range("A2").Value
    ­YRange("A2").Value =""©Î¬O0®É~ ±z°õ¦æªº®É­Ô´N·|¿ù»~
     henji = MsgBox("½T©w¿é¤J " & Range("A1").Value & "­Ó»sµ{»Ý¨D?", Buttons:=vbYesNo + vbQuestion, Title:="»Ý¨D¼Æ½T»{")
    b = Range("A2").Value
    ³o¨â¦æ½Õ¤@¤U¦ì¸m~ ¦p¤U
    b = Range("A2").Value
    IF b<0  THEN
         MsgBox "½Ð­«·s½T©w±zªº»sµ{»Ý¨D¼Æ"
         Exit Sub
    ELSE
         henji = MsgBox("½T©w¿é¤J " & Range("A1").Value & "­Ó»sµ{»Ý¨D?", Buttons:=vbYesNo + vbQuestion, Title:="»Ý¨D¼Æ½T»{")
     END IF
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¯àµ½¥Î®É¶¡ªº¤H¡A¥²¯à´x´¤¦Û¤v§V¤Oªº¤è¦V¡C
ªð¦^¦Cªí ¤W¤@¥DÃD