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

[µo°Ý] VBA ¦p¦ó°»´ú Cellªºµù¸Ñ¦³½s¿è?

[µo°Ý] VBA ¦p¦ó°»´ú Cellªºµù¸Ñ¦³½s¿è?

Hello, ¦U¦ì¤j¤j

¦pÃD, °²³]¦³¤@Excel'sªºCell¤w¦³¤@¬qµù¸Ñ¤å¦r,
VBA­n¦p¦ó°»´ú³o¤@¬qµù¸Ñ¦³³Q¤H½s¿è¹L¤º®e?
WorkSheet_Change()µLªk°»´ú¥X.
¦A½Ð¤£§[«ü¾É....
Thanks ~
·s¤â¤W¸ô¡A½Ð¦h¥]²[¡C

¥»©«³Ì«á¥Ñ GBKEE ©ó 2020-4-25 14:47 ½s¿è

¦^´_ 1# ¼B¤j­G

365 ¤¤ [µù¸Ñ] CommentThreaded ©Î [ªþµù] Comment Àx¦s®æ¥u¥i¤G¿ï¤@
365  ·sª©ªº[µù¸Ñ] ¥i¥[¤J¦hµ§ªºµù¸Ñ,2003,2010  ªºµù¸Ñ Comment 365¤¤§ï¬°[ªþµù]'
µù¸Ñ©Ò¦b¤u§@ªí¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  3.     With Target
  4.         If Not .Comment Is Nothing Then   '³B²z356 ªº[ªþµù]¤]¬O2003,2010ªº[µù¸Ñ]
  5.            Note_Text .Address(0, 0, , 1), .NoteText
  6.         End If
  7.     End With
  8. End Sub
  9. Private Sub Note_Text(Rng As String, Rng_Text As String)
  10.     Dim xMatch As Variant, xN As Integer, i As Integer
  11.     On Error GoTo ERR
  12.     With Sheets("Note_Text")
  13.         xMatch = Application.Match(Rng, .Rows(1), 0)
  14.         If IsError(xMatch) Then
  15.           With .Cells(1, Application.CountA(.Rows(1)) + 1)
  16.                     .Cells(1) = Rng
  17.                     .Cells(2) = Rng_Text & "--" & Now()
  18.           End With
  19.         Else
  20.             xN = Application.CountA(.Columns(xMatch))
  21.             With .Cells(1, xMatch)
  22.             If Split(.Cells(xN), "--")(0) <> Rng_Text Then .Cells(xN + 1) = Rng_Text & "--" & Now()
  23.                Rng_Text = ""
  24.                     For i = 2 To xN + 1
  25.                     Rng_Text = Rng_Text & IIf(i > 2, vbLf, "") & .Cells(i)
  26.                     Next
  27.                     MsgBox Rng_Text
  28.           End With
  29.         End If
  30.     End With
  31.    Exit Sub
  32. ERR:
  33.     With ThisWorkbook
  34.         With .Sheets.Add(, .Sheets(.Sheets.Count))
  35.             .Name = "Note_Text"
  36.        '     .Visible = xlSheetVeryHidden  'ÁôÂð_¨Ó¯à¥Î¥¨¶°¨ú®ø
  37.         End With
  38.         .Save
  39.         Me.Activate
  40.     End With
  41.     Resume
  42. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD