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

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

¦^´_ 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

¥»©«³Ì«á¥Ñ 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

¦^´_ 12# lpk187


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

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

¦^´_ 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)
    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

¦^´_ 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

¦^´_ 17# lpk187


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

TOP

ÁÂÁ lkp187 ªº¨Ò¤l , §ÚÁA¸Ñ·s¼W³¡¤Àªº»yªk¤F , ·P®¦ ....
ÂàWeb¸ê®Æ , ¸g¥Ñ¿ý»s¤è¦¡«á¤]ÁA¸Ñ¤Î¹B¥Î ,
¥Ø«eŪ¨ú¸ê®Æ®É ,
I :
Offset(A1, Match("À³¦¬±b´Ú²bÃB", Range("A2:A2000"), 0), 2)
Offset(A1, Match("À³¦¬±b´Ú²bÃB", "A2:A2000", 0), 2)
Offset(A1, Match("À³¦¬±b´Ú²bÃB", Range("A2:A2000"), 0), 2)
Offset(A1, Match("À³¦¬±b´Ú²bÃB", "$A$2:$A$2000, 0), 2)
¥H¤W»yªk³£»¡¿ù , ¤£ª¾¦p¦ó­×§ï ?
¤£µM´N¬O»¡ Match ¨S¦³©w¸q ??

II:
¬Ýºô¸ô¤¶²Ð Match ¥Îªk®É , ¦³´£¨ì¸ê®Æ­n¥ý±Æ§Ç , ¦ý WebÂà¥X¨Óªº¸ê®Æ , ¨S¦³±Æ§Ç , ÁÙ¦³ªÅ¦æ , ¤]¦³¬ÛÃöÄæ¦ì¦WºÙ , ¦ý«e­±¤@­Ó¥|ªÅ®æ , ¥t¤@­Ó¤­®æ ,
³oºØ¸ê®Æ­n¦p¦ó¤U»yªk , ¤~¯à¥¿½T¤ñ¹ï¥X¥¿½T¸ê®Æ«á¦^¶Ç ?

TOP

¦^´_ 19# oliwa


    ­É¥Î¤u§@ªí¨ç¼Æ¥²¶·­n¥[¤WApplication.WorksheetFunction©Î²¼gApplication
¨Ò¦pApplication.Offset(A1, Application.Match("À³¦¬±b´Ú²bÃB", Range("A2:A2000"), 0), 2)

¥t¥~¡A¤u§@ªí¨ç¼Æ¦b Visual Basic ¤¤¨Ã¤£¬O«Ü¦n¥Î¡A¥Îµ{¦¡½X¨Óªí¥Ü¦³®É·|¤ñ¤u§@ªí¨ç¼ÆÁÙ­n¦n¥Îªº¦h¡I

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD