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

[µo°Ý] ½Ð°Ý¦p¦ó¦b´¡¤J·sªº¤@¦C®É, §@¬°Ä²µo¨Æ¥ó?

[µo°Ý] ½Ð°Ý¦p¦ó¦b´¡¤J·sªº¤@¦C®É, §@¬°Ä²µo¨Æ¥ó?

Hello, all

¤p§Ì²Ä¤@¦¸µo°Ý, ¦³¥ô¦ó¨¥µü¤£·íªº¦a¤è½Ð¤£§[«ü¥¿.


¦p¤W¹Ï,
§Ú·Q¦bRow47¨ì50¤§¶¡´¡¤J¤@·s¦C, ¨Ã§@¬°¨Æ¥óIJµo¥t¤@­Ó«ü¥O,
¦b¦³¼Æ¦rªºÄæ¦ì¤¤¶K¤W«ü©wªº¤½¦¡ (¦]¬°³æ¯Â´¡¤J¤@¦C, ¤½¦¡¤£·|¦Û°Ê©Óŧ¤W¤@¦C).

¦ý¤£ª¾¹D¥i¥H¥Î¤°»ò»yªk¨ÓIJµo"´¡¤J¤@¦C"³o­Ó¨Æ¥ó,
½Ð¦U¦ì¤j¯«¤£§[¸Ñ´b.

Many thanks...
Josh

¦^´_ 1# joshzhong
¸Õ¸Õ¬Ý
¤u§@ªí¤Wªº¹w³]¨Æ¥ó(Àx¦s®æ¦³§ïÅÜ©ÒIJ°Ê¨Æ¥ó)
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range)
  3.     Dim Rng As Range
  4.     Set Rng = Range("C45:H50")   '«ü©w´¡¤J·sªº¤@¦Cªº½d³ò
  5.    
  6.     If Target.Columns.Count = Rng.Columns.Count Then
  7.         'Columns.Count:¶Ç¦^½d³ò¤ºÄæ¦ìªºÁ`¼Æ
  8.         'Rows.Count:¶Ç¦^½d³ò¤º¦C¦ìªºÁ`¼Æ
  9.         If Not Intersect(Rng, Target) Is Nothing And Target.Rows.Count = 1 Then
  10.         'Intersect ¤èªk ¶Ç¦^  ***[Range ª«¥ó]***¡A¦¹ª«¥ó¥Nªí¨â­Ó©Î¦h­Ó½d³ò­«Å|ªº¯x§Î½d³ò¡C
  11.         ' Target.Rows.Count = 1  '¤@¦Cªº½d³ò
  12.             If Target.Cells(1).Column = Rng.Cells(1).Column And Target.Cells(Target.Cells.Count).Column = Rng.Cells(Rng.Cells.Count).Column Then
  13.                 'Target.Cells(1).Column = Rng.Cells(1).Column
  14.                 '´¡¤J·sªº¤@¦Cªº²Ä¤@­ÓÄ渹=«ü©w´¡¤J·sªº¤@¦Cªº½d³òªº²Ä¤@­ÓÄ渹
  15.                 'Target.Cells(Target.Cells.Count).Column = Rng.Cells(Rng.Cells.Count).Column
  16.                 '´¡¤J·sªº¤@¦Cªº³Ì«á¤@­ÓÄ渹 = «ü©w´¡¤J·sªº¤@¦Cªº½d³òªº³Ì«á¤@­ÓÄ渹
  17.                 MsgBox Target.Address
  18.             End If
  19.         End If
  20.     End If
  21. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 1# joshzhong

­Ó¤H½m²ß¡A´¡¤J¦C«á¡A¶ñ¤J¤½¦¡
    VBA¸Ñªk2.gif

TOP

¨â¦ì¤j¤j,
ÁÂÁ§A­Ìªº¨ó§U, §A­Ì³£¦n¼F®`!

§Ú¦¨¥\¤F, ¥i¥H´¡¤J¤@¦C§@¬°trigger¨Ó¤Þµo¨ä¥L°Ê§@; ¥Ø«e¥ý¨Ï¥Î²Ä¤@ºØ¤è¦¡,
ı±o¦³½ì, ¥¿¦b¸Õ¸Õ²Ä¤GºØ°µªk,
¥ý·P¿E¤£ºÉ~

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD