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

[µo°Ý] Àx¦s®æÂê©w¹J¨ìªº°ÝÃD

[µo°Ý] Àx¦s®æÂê©w¹J¨ìªº°ÝÃD

¦U¦ì«e½ú¦n¡A§Ú³Ìªñ¹J¨ì«È¤H¸ò§Ú´£¡A§Æ±æEXCELÀx¦s®æ¥u­n¬OªÅ¥Õªº¦a¤è¤~¯à¿é¤J¡A¥B¥u¯à¿é¤J¤@¦¸¡A¦sÀÉ«á´N¤£¯à­×§ïªº»Ý¨D¡A
¤Wºô½§äµL·N¤¤µo²{VBA¥i¥H¹F¨ì³o­Ó»Ý¨D¡A¨Ã§ä¨ì¤F³o¬q½X

Dim mm, nn
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If nn > 1 Then
    Selection = mm
    Application.EnableEvents = True
    Exit Sub
End If
If mm <> "" Then Target = mm
Application.EnableEvents = True
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
nn = Target.Count
mm = Target
End Sub

¸g´ú¸Õ«á½T¹ê¥i¥H¹F¨ì«È¤H©Ò»Ýªº­­¨î¡A¦ý¬Oµo¥Í¤F¤@­Ó°ÝÃD¡A
´N¬O­YÀx¦s®æ¦¡³æ®æªº¸Ü¡A¨S°ÝÃD¡C
­YÀx¦s®æ¬O¦X¨ÖÀx¦s®æ¡A´N¨S¦³®Ä¥Î¡A©Ò¥H·Q½Ð±Ðª©¤Wªº«e½ú¬O§_¥i¥H¨ó§U¬Ý¤@¤U­n¦p¦ó­×§ï³oµ{¦¡½X¡A
·P¿E¤£ºÉ¡C

Microsoft Excel ¤u§@ªí.rar (13.51 KB)

¦^´_ 1# tonyltt

¥u®t¤p³\
  1.    Dim mm As Variant, nn
  2. Private Sub Worksheet_Change(ByVal Target As Range)
  3. Dim bln
  4. Application.EnableEvents = False
  5. If nn > 1 Then
  6.     bln = mm(1, 1) <> ""
  7. Else
  8.     bln = mm <> ""
  9. End If
  10. If bln Then
  11.     Target.Value = mm
  12. End If
  13. Application.EnableEvents = True
  14. End Sub

  15. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  16. nn = Target.Count
  17. mm = Target.Value
  18. End Sub
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

ÁÂÁÂkimbal «e½ú¼ö¤ß´À§Ú¸Ñ´b!!!!·P®¦~·P®¦!!!!:)

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD