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

[µo°Ý] ½Ð°Ý¦³µL¦@¥ÎWorksheet_Changeªº¤èªk

[µo°Ý] ½Ð°Ý¦³µL¦@¥ÎWorksheet_Changeªº¤èªk

¦bVBAªºSheet1¤¤¶K
Private Sub Worksheet_Change(ByVal Target As Range)
.
.
.
End Sub
¥i¹F¨ìÀx¦s®æÅÜ°Ê«á¹Bºâ
¦ý°²³]¦³10­ÓSheet(Sheet1~Sheet10)
¯à§_¤£»Ý¨C­ÓSheet³£¶K´N¯à¹F¨ìÀx¦s®æÅÜ°Ê«á¹Bºâªº¥\¯à
YOYO

Workbook_SheetChange¨Æ¥ó

TOP

½Ð°Ý¬O¶K¦bThis Workbook¶Ü?
Private Sub Workbook_SheetChange(ByVal Target As Range)
.
.
End Sub
§ÚÁÙ¬OµLªk°õ¦æ
YOYO

TOP

¥»©«³Ì«á¥Ñ oobird ©ó 2011-8-14 11:06 ½s¿è

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
a.gif

TOP

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
oobird µoªí©ó 2011-8-14 10:16



    ½Ð°Ýª©¤j
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
¦ý¤º®e§Ú¥Îªº¬OCells(i,j)
½Ð°Ý­n«ç»ò­×¥¿
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Cells)·|¿ù»~
YOYO

TOP

¦^´_ 5# yanto913
¦ý¤º®e§Ú¥Îªº¬OCells(i,j)
§Aªº¤º®e¥u¦³§Aª¾¹D°Ú?§A­n»¡¥X¨Ó§r!

TOP

¦^´_ 6# GBKEE


    ¤w¤W¶ÇÀɮסA§ïRange´N¥i¥H¡A¦ý·Qª¾¹D¦pªG­n¥ÎCells«ç»ò¸Ñ¨M!!

DATA_Sample_20110809.rar (18.73 KB)

YOYO

TOP

¦^´_ 7# yanto913
  1. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  2. With Sh
  3. For i = 1 To 22
  4.     .ChartObjects("Chart 1").Activate
  5.     ActiveChart.SeriesCollection(1).Points(i).Select

  6.     If .Cells(i + 1, 7) = "Return" Then
  7.     j = 3 '¬õ
  8.     Else
  9.     If .Cells(i + 1, 7) = "Remove" Then
  10.     j = 21 'µµ
  11.     Else
  12.     If .Cells(i + 1, 7) = "IDLE" Then
  13.     j = 6 '¶À
  14.     Else
  15.     If .Cells(i + 1, 7) = "Prod" Then
  16.     j = 10 'ºñ
  17.     Else
  18.     j = 2 '¥Õ
  19.     End If
  20.     End If
  21.     End If
  22.     End If
  23.    
  24.     Selection.Interior.ColorIndex = j
  25.    
  26.     Next
  27.     End With
  28. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# yanto913
  1. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  2.     With Sh
  3.         For i = 1 To 22
  4.             .ChartObjects("Chart 1").Activate
  5.             ActiveChart.SeriesCollection(1).Points(i).Select
  6.             Select Case .Cells(i + 1, 7)
  7.                 Case "Return"
  8.                 j = 3 '¬õ
  9.             Case "Remove"
  10.                 j = 21 'µµ
  11.             Case "IDLE"
  12.                 j = 6 '¶À
  13.             Case "Prod"
  14.                 j = 10 'ºñ
  15.             Case Else
  16.                 j = 2   '¥Õ
  17.             End Select
  18.             Selection.Interior.ColorIndex = j
  19.         Next
  20.     End With
  21. End Sub
  22. ''''''''*************************************
  23. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  24.     With Sh
  25.         For i = 1 To 22
  26.             .ChartObjects("Chart 1").Activate
  27.             ActiveChart.SeriesCollection(1).Points(i).Select
  28.             If .Cells(i + 1, 7) = "Return" Then
  29.                 j = 3 '¬õ
  30.             ElseIf .Cells(i + 1, 7) = "Remove" Then
  31.                 j = 21 'µµ
  32.             ElseIf .Cells(i + 1, 7) = "IDLE" Then
  33.                 j = 6 '¶À
  34.             ElseIf .Cells(i + 1, 7) = "Prod" Then
  35.                 j = 10 'ºñ
  36.             Else
  37.                 j = 2   '¥Õ
  38.             End If
  39.             Selection.Interior.ColorIndex = j
  40.         Next
  41.     End With
  42. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD