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

¬O§_¦³¤H¥i¨ó§U¶}µo ?

¦^´_ 17# lpk187


    ¦¬¨ì , §Ú¨Óª±ª±¬Ý ..............

TOP

¦^´_ 16# oliwa

¼gVBA¥»¨Ó´N¬O­n½m²ß¡A¦Ó¥B­n¦h¬Ý»¡©ú¡A
»¡¹ê¦bªº§Ú¨Ã¤£¬O°ª¤â¡A¥u¬O¦Û¤v¤½¥q¦³¥Î¨ìVBA¥h°µ¶i¾P¦s¡A©Ò¥H·|ªº¨ä¹ê¤]¤£¦h¡I
§Ú­Ì¦A¨Ó¥H¤Uªº»¡©ú
·s¼W
        A)«ö¤U«á·s¼W¤@¦C , ¸õ¥Xµøµ¡¿é¤J¤½¥q¥N¸¹ , Àˬd¬O§_¤w¦s¦b¹ïÀ³¦¹¥N¸¹ªºSheet
        B)½Æ»sForm Sheet , ¤Î§ó¦W¬°¸Ó¤½¥q¥N¸¹¬°Sheet¦W
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2. If Target.Address = Cells(Target.Row, "A").Address Then
  3.     If Target = "·s¼W" Then
  4.         msg = MsgBox("¬O§_·s¼W¤@µ§¸ê®Æ", 4)
  5.         If msg = vbNo Then End
  6.         inp = InputBox("½Ð¿é¤J¥N¸¹", "·s¼W")
  7.         If inp = "" Then End
  8.         For Each sh In Sheets ' §ä´M©Ò¦³¤u§@ªí
  9.             If sh.Name = inp Then '¦pªG¦³¤u§@ªí¦WºÙ¬Û¦Pªº¡A´Nµ²§ô¦¹µ{§Ç
  10.                 MsgBox "¤w¦³¦¹¥N¸¹¦s¦b¡A½Ð­«·s¿é¤J"
  11.                 End 'µ²§ô Sub
  12.             End If
  13.         Next
  14.         Sheets("From").Copy Before:=Sheets(2) '½Æ»sFrom¤u§@ªí©ñ¦b²Ä2­Ó¦ì¸m
  15.         Sheets("From (2)").Name = inp '¤u§@ªí¦UºÙ§ó§ï¬°InputBox¿é¤Jªº¥N¸¹
  16.         Sheets("List").Select
  17.         Rows(Target.Row).Insert '¤W­± For...Next ­Y¨S§ä¨ìInputBox¬Û¦P¥N¸¹«h¦b"·s¼W"ªº³o­ÓÀx¦s®æ·s¼W¤@¦C
  18.         Cells(Target.Row - 1, "A") = inp '·s¼W¤@«h«á¡A¦bAÄ檺·s¼W¥X¨ÓªºÀx¦s®æ¨ä¬°InputBox¿é¤Jªº¥N¸¹
  19.     End If
  20. End If
  21. End Sub
½Æ»s¥N½X

TOP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    LastRow = Sheets("List").Cells(1, "A").End(xlDown).Row
    If Target.Row < LastRow + 1 And Target.Row > 1 Then
        If Target.Address = Cells(Target.Row, "J").Address Then
            If Target.Select Then
                Id_Comp = Cells(Target.Row, "A").Value
                Id_Year = Cells(Target.Row, "D").Value
                MsgBox Id_Comp & Id_Year
            End If
        End If
    End If
End Sub

¥Î lpk187 ªº¨Ò¤l + »¡©ú«á , ¸Õ§¹¦p¤Wªº¤º®e , ¥i¥H¹F¦¨«ö¤U¬YÀx¦s®æ«á§Y©I¥sªº°Ê§@ , ·PÁ .......

TOP

¦^´_ 14# oliwa

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = .Address Then
    If Target.Select Then''''''''''³o¤@­Ó IF...End If ¬O¤£¥²­nªº¡A¥u­n²Ä¤@­ÓIF´N¥i¥H¹F¦¨§A­nªºMsgBoxªºµ²ªG
       MsgBox "Hello !"
      
    End If
End If
End Sub
¥tCells(Target.Row,1).Value    ¬O¥i¥HŪ¨ú¸ÓÀx¦s®æªº­È¡A¦Ó¥B  .Value ¬O¥i¥H¬Ù²¤ªº

TOP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Cells(Target.Row, "J").Address Then
    If Target.Select Then
       MsgBox "Hello !"
      
    End If
End If
End Sub

·PÁ¨ó§U , §Ú§ï¦¨¦p¦¹ªº¤è¦¡¨Ó¹B§@ , ÂI¿ï¸Ó¸ÓÀx¦s®æ«á§Y¥X²{ MsgBox , ·PÁ ...
¥Î MsgBox §ï¦¨ Call Sub , §Y¥i¹F¦¨¿ï»¡§Y°õ¦æªº°Ê§@¤F ,

¨º½Ð°Ý , ¦bÂI¿ï«á­n¨ú±o¸Ó¦C¬YÀx¦s®æ¤º®e , ¬O§_¥i¥H¥Î Cells(Target.Row,1).Value ?

TOP

¦^´_ 12# lpk187


    ¦¬¨ì , §Ú¸Õª±ª±¬Ý³o²Õ .....

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-3-29 22:19 ½s¿è

¦^´_ 11# oliwa

oliwa ¤£¥Î«ì¤ß¡I¨ä¹ê¤j®a¤£¬O¤£À°§A¡A¦Ó¬O§A¦Û¤v­n¤@¨B¤@¨B¥h­q¥Ø¼ÐµM«á¥h§¹¦¨§Aªº¥Ø¼Ð¡A²¦³º¥H«á§A¼gªºµ{¦¡¥²¶·§A¦Û¤w¥hºûÅ@©Ò¥H´Nºâ§O¤H¼gµ¹§Aªºµ{¦¡¦pªG¹F¤£¨ì§Aªº¥Ø¼Ð¨º®É«ç»ò¿ì?
VBA¬Oµ{¦¡½X¡A©Ò¥HCOPY¨ÓCOPY¥h¡A­Y¨S­×§ï§A©Ò»Ý­nªº¦A«ç»òCOPY¤]¨S¥Î¡A§Ú¨Ó¥ý¶}­ÓÀY¨Ó»¡§Aªº¥Ø¼Ð¦n¤F

·s¼W
        A)«ö¤U«á·s¼W¤@¦C , ¸õ¥Xµøµ¡¿é¤J¤½¥q¥N¸¹ , Àˬd¬O§_¤w¦s¦b¹ïÀ³¦¹¥N¸¹ªºSheet
        B)½Æ»sForm Sheet , ¤Î§ó¦W¬°¸Ó¤½¥q¥N¸¹¬°Sheet¦W


¤W­±ªº"·s¼W"§A¬O­n§Q¥Î§A¤W¶ÇÀɮתºÀx¦s®æ©ÎªÌ¬O§Q¥Î¤@­Ó«ö¶s¨Óªí¥Ü¡H¨âªÌ©Ò¼gªº¥N½X·|¦³¨Ç³\ªº¤£¦P¡A¦ý§Q¥ÎÀx¦s®æ«h·|¯d¤U¯ÊÂI(¥²¶·¸õ¥X¨º¤@®æ«á¦AÂI¿ï¨º­ÓÀx¦s®æ)
§Q¥Î"Àx¦s®æ"¤è¦¡¤j¬ù¥i¥H³o»ò¼g¡A""§A¥²¶·¤F¸Ñ¨C¤@±ø¦¡¤lªº·N¸q¤~¦æ""
Private Sub Worksheet_SelectionChange(ByVal Target As Range)  '¦¹¨Æ¥ó¬O·í§A¿ï¨ú¬Y­ÓÀx¦s®æ«áµo¥Í
If Target.Address = Cells(Target.Row, "A").Address Then'¤U­±§PÂ_¬O¥ý¦b"AÄæ"´M§ä¦³"·s¼W"¦r¼ËªºÀx¦s®æ
    If Target = "·s¼W" Then
        msg = MsgBox("¬O§_·s¼W¤@µ§¸ê®Æ", 4)
        If msg = vbNo Then End         '§PÂ_­Y«ö¤U¥k«ö¶s«á«hÂ÷¶}µ{¦¡
        inp = InputBox("½Ð¿é¤J¥N¸¹", "·s¼W") '¸õ¥Xµøµ¡¿é¤J¤½¥q¥N¸¹
        '¥H¤U¬O§A­nªº¥Ø¼Ð¥N½X
        '¥N½X(¤U¦¸¦Aºt½m)
        '''''''''''''''''''''''''''''''''''''''''''''''''
    End If
End If
End Sub
¥H¤W¬O³¡¥÷¥N½X¡A§A¥i¥H§Q¥Î"F9"Áä¨Ó¤¤Â_²Ä¤@­Ó"IF"¡A¦A§Q¥Î"F8"Áä¨Ó³v¦æ°õ¦æ¡A§A·|«Ü®e©öªº¤F¸Ñµ{¦¡ªº¹B§@¹Lµ{
¥H«áªº¥N½X§Ú­Ì¦AºCºCªº¨Ó°Q½×
1

µû¤À¤H¼Æ

    • GBKEE: ºë«~¤å³¹ª÷¿ú + 4

TOP

¦^´_ 1# oliwa


    ¦U¦ì»¡ªº³£¨S¿ù , ¿ý»s¤]¦³¸Õ¹L , ¦ý¾ã¦X°_¨Ó´N¬O¤£¯à¥¿±`¹B§@ ,
    ºô¤W¦³¤£¤Ö½d¨Ò , ¦ýCOPY¨ÓCOPY¥h´N¬OµLªk¥¿¹B§@ , ¦]¬°°Ñ¼Æ¤Þ¥Î¤£¦P¦ÛµMµLªk³s³e¨Ï¥Î ,
    ¦³¨Ç»yªk¦³»¡©ú , ¦³¨Ç¨S¦³ , ¦ÛµM¬O¬Ý¤£À´ , ¥s¦n¦AÄ~Äò¬Ý½d¨Ò§ä¸Ñ»¡¤F .....

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2015-3-28 13:28 ½s¿è

§Ú·Q ¥i¯à¬O¤@¶}©l§Ú¦V¼Ó¥D¸ß°Ýªº·N«ä¤£©ú½T
¾É­P¼Ó¥D»~·|§Úªº·N«ä
+==================================+
"    ½Ð²³æ±Ô­z±zªº°ÝÃDÂI   ©Ò»Ý¥\¯à °Ê§@¤è¦¡
    ¥u¥á¤@¬q¸Ü ¨S¥ô¦ó»¡©ú  «ÜÃøÅý¤H²z¸Ñ"
+==================================+
³o¬q¸Ü¬O»¡ °£¤F "²³æ±Ô­z±zªº°ÝÃDÂI ¡B  ©Ò»Ý¥\¯à °Ê§@¤è¦¡"   Áٻݭn  ªþÀÉ®×
ªþÀɮתº·N«ä  ¤£¬O¥s§A¥á­ÓªÅµ{¦¡½XÀÉ®×(¤£ºÞ¦³µL¤º®e)
µM«á´N­n¤H®aÀ°§A¸Ñ¨M...
³o¼Ë´N«Ü¹³  ¤µ¤Ñ¬Y¤H¾÷¨®Ãa±¼ ¥L®³¥h­×²z¡A«o¨S§âÆ_°Íµ¹ºû­×¤H­û
³o¼Ë´Nºâºû­×¦n  «çª¾¹Dºû­×§¹¦¨©Î¨S§¹¦¨?? «çª¾¹D¦³¨S¦³¨ä¥L°ÝÃD???
À´§Ú·N«ä?

¤µ¤Ñ¤£¬O»¡¤£¯àµo°Ý  (¤j¦rÂI ¥H§K¤S³Q»~·|§Ú¦b¶æ¤£¯àµo°Ý)
¦Ó¬O¥ú¥á­ÓÀÉ®× (©Î³\¤º¦³»¡©ú) ¨S¥ô¦óµ{¦¡½X  
´N­n¤H®aÀ°§A¸Ñ¨M
»¡¯uªº  ¦pªG¬O§Ú ...   §A­þ¦ì???
§Aµo°Ý¬O¾Ç²ß ¤£¬O¾ß²{¦¨
¹³¤§«e§Úµoªº¤å³¹
¥ý¦Û¤v¹Á¸Õ¡B¹J°ÝÃDµo°Ý(»Ýµ{¦¡½X+»¡©ú)¡B¦Û¤v¤~¯à¾Ç¨ì

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 7# oliwa
¦Û­×¤@©u«o¨S¦³¥ô¦óµ{¦¡½X¡A³o¹ê¦b¦³°ÝÃD
´«°µ¬O§Ú¡A¦Û¤v­n¿ý»s¤@¤U¡A·P¨ü¤@¤Uµ{¦¡½X®t§O©O¡H
¤£µM§â§Aªº·Qªkµo¥]¥X¥h¡A»¡¤£©w¦³¤H´N·|À°¦£

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD