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

¤@­ÓÅܦâ°ÝÃD

¤@­ÓÅܦâ°ÝÃD

¤j¤j­Ì, ¦w¦n
¦³¤@­ÓÀx¦s®æÅܦâ°ÝÃD½Ð±Ð, ¹Ï¤ù¦³©ú²Ó»¡©ú, ¥ý¦æÁ¹L¦U¤j¤j­Ì,
hong912

¦^´_ 21# zyzzyva
ÁÂÁ«e½úµL¨p±Ð¾É¡A²{®É¥¿¤u§@¤¤¡A«Ý¤µ±ß©ñ¤u«á¸Õ¥Î¡A¦ý¯u¤ß·PÁ¡A¯¬Ä@°·±d¡C
hong912

TOP

¦^´_ 20# hong912
¥i¥H¸ÕµÛ²z¸Ñ¤@¤Ucode¡A°õ¦æ¦X¨ÖÀx¦s®æªº¬Omerge¡A¥u­n§â¥¦§R°£´N¥i¥H¤F¡C
¨S¦³¦X¨Öªº¸Ü¡Awraptext¥i¥H¥¿±`§@¥Î¡A¥t¤@­Óchange¨Æ¥ó¤]¥i¥H§R±¼¡C
  1. Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
  2.     With Selection
  3.         If .Interior.ColorIndex = 5 Then
  4.             .Interior.ColorIndex = 3
  5.         Else
  6.             .Interior.ColorIndex = 5
  7.             .WrapText = True
  8.         End If
  9.     End With
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 18# zyzzyva
ÁÂÁ«e½ú, °J¤ß·PÁÂ!
hong912

TOP

¦^´_ 17# hong912
¬O2­Ó¨Æ¥ó¡A­n©ñ¦b¦P¤@­Óworksheet¡C«ö¥kÁä«á·|Åܦâ¦P®É¦X¨ÖÀx¦s®æ¡A¦pªG¦b¸ÌÀY¿é¤J¡A·|¦³´«¦Cªº®ÄªG(¦ý¤£¬O«Üº}«G)¡C
­Ó¤Hı±o¡A¦pªG·|»Ý­n¾Þ§@¤½¦¡©Îµ{¦¡¡A«D¥²­nºÉ¶qÁקK¨Ï¥Î¦X¨ÖÀx¦s®æ¡AÀx¦s®æ¦X¨Ö¤§«á¡A®e©ö¦³«Ü¦h©_©_©Ç©Çªº°ÝÃD¡C
  1. Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)

  2. With Selection
  3.     If .Interior.ColorIndex = 5 Then
  4.         .Interior.ColorIndex = 3

  5.     Else
  6.         .Interior.ColorIndex = 5
  7.         .Merge
  8.         .WrapText = True
  9.         
  10.     End If
  11. End With
  12. End Sub


  13. Private Sub Worksheet_Change(ByVal Target As Range)
  14. Dim Vhight As Single
  15. If Target.WrapText = True Then
  16. With Target
  17. .Select
  18. .RowHeight = 1
  19. .WrapText = True
  20. .UnMerge
  21. .EntireRow.AutoFit
  22. Selection.Merge
  23. Vhight = .Width * .Height / Selection.Width
  24. If Vhight < 16 Then Vhight = 16
  25. .RowHeight = Vhight
  26. .VerticalAlignment = xlCenter
  27. End With
  28. End If
  29. End Sub
½Æ»s¥N½X

TOP

¦^´_ 16# zyzzyva
«e½ú, §A¦n,
¥i§_©ú½T»¡©ú, ¦p¦ó©ñ©ó¦P¤@µ{¦¡°Ï¤º, ¨ü±Ð¤F, ·P®¦½ç!
hong912

TOP

¦^´_ 15# hong912
Àx¦s®æ¦X¨Ö«á¤£¤Ó¦n¾Þ§@¡A½Ð°Ñ¦Ò13Fªº¦^ÂСC

TOP

¥»©«³Ì«á¥Ñ hong912 ©ó 2016-10-11 19:55 ½s¿è

¦^´_ 13# zyzzyva
¤j¤j¦n,
ÏްݤF¤@­ÓÅܦâ°ÝÃD, ±a¥X¥t¤@­Ó´«¦C°ÝÃD, ­Y¯à§â¨â­Óµ{¦¡¿Ä¦X, ´N¬O§_¥i¥H, ÁÂÁÂ!!
hong912

TOP

¦^´_ 13# zyzzyva
·PÁ¤j¤j,
§Ú·|Æp¬ã, ­Y¦³¤£°Ý³B, ¦A½Ð±Ð, ÁÂÁÂ,

TOP

¦^´_ 12# ©P¤j°¶
¨º¬O¦X¨ÖÀx¦s®æªº°ÝÃD¡Aexcel¦X¨ÖÀx¦s®æ¦³«Ü¦h°ÝÃD¡A¥Îvba³]©wwraptext¤]¨S¥Î(¥i¥H¤â°Ê¦b¥Ø¼Ð¦Cªº¤U½t«ö¨â¤U¡A·|µo²{¤@¼ËµL®Ä)¡A¸Ô²Ó¥i¥H°Ñ¦Ò¡G
http://blog.contextures.com/archives/2015/12/03/autofit-merged-cells-row-height-update-20151203/
§Ú·Q±zÀ³¸Ó¬O¦X¨Ö¡BÅܦ⧹Àx¦s®æ­n¦b¸ÌÀY¿é¤J¤å¦r¡H§â¤U­±ªºcode¥[¨ì¦P¤@­Óworksheet¸Ì¸Õ¸Õ¬Ý¡C
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. Dim Vhight As Single
  3. If Target.WrapText = True Then
  4. With Target
  5. .Select
  6. .RowHeight = 1
  7. .WrapText = True
  8. .UnMerge
  9. .EntireRow.AutoFit
  10. Selection.Merge
  11. Vhight = .Width * .Height / Selection.Width
  12. If Vhight < 16 Then Vhight = 16
  13. .RowHeight = Vhight
  14. .VerticalAlignment = xlCenter
  15. End With
  16. End If
  17. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD