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

·Q½Ð°ÝÃö©ó¤@¨Ç¦Û°Ê¤Æ®æ¦¡³]©wªº°ÝÃD

·Q½Ð°ÝÃö©ó¤@¨Ç¦Û°Ê¤Æ®æ¦¡³]©wªº°ÝÃD

¦]¦³³\¦h¥÷¤å¥ó¦ý¨ä®æ¦¡¤j­P¬Û¦P¡A¥u¦³¬¡­¶Ã¯¼Æ¶q¤£¦P
¦]¬°Äæ¦ì¤j­P¬Û¦P ¥u¬O¦³¨Ç¦³·s¼W©M´î¤Ö
Äæ¼e¦³¨Ç¨Ç³\ÅܤƦӤw

(¥¨¶° µ{¦¡½X¥]§t ¨ú¥N¡B¦Û°Ê·s¼W¬¡­¶Ã¯¡B³]©wÄæ¼e¡B¦C¼e )


·Q½Ð°Ý»¡¥H¤Uªºµ{¦¡½X¬O§_¥i¥H²¤Æ(¯àªº¸Ü¯àªþµù¨Ç³\»¡©ú¶Ü?)
¦]¬°Åv­­©|¤£¨¬ ©Ò¥H¥u¯à¶K¤Wµ{¦¡½X...
³Â·Ð¦U¦ì°ª¤â¤F ÁÂÁÂ

'-------°Ï¤À-ÀY
For Each s In Sheets


    Sheets("¤@").Select
If s.Name = "¤@" Then

'-----§ó´«ÃöÁä¦r-ÀY----------
    Cells.Replace What:="AU", Replacement:="='C:\U", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
'-----§ó´«ÃöÁä¦r-§À-----------

'------¦C°ª-ÀY
            Rows("1:600").Select
            Selection.RowHeight = 20
'-------¦C°ª-§À

'-------Äê¦ì½Õ¾ã¼e«×-ÀY
        Columns("a:a").Select
        Selection.ColumnWidth = 14
        Columns("b:b").Select
        Selection.ColumnWidth = 30
        Columns("c:c").Select
        Selection.ColumnWidth = 26
        Columns("d:d").Select
        Selection.ColumnWidth = 12
        Columns("e:e").Select
        Selection.ColumnWidth = 50
        Columns("f:f").Select
        Selection.ColumnWidth = 10
        Columns("g:g").Select
        Selection.ColumnWidth = 20
        Columns("h:h").Select
        Selection.ColumnWidth = 10
        Columns("i:i").Select
        Selection.ColumnWidth = 20
        Columns("j:j").Select
        Selection.ColumnWidth = 10
        Columns("k:k").Select
        Selection.ColumnWidth = 20
        Columns("l:l").Select
        Selection.ColumnWidth = 10
         Columns("m:m").Select
        Selection.ColumnWidth = 20
        Columns("n:n").Select
        Selection.ColumnWidth = 30
        Columns("o:o").Select
        Selection.ColumnWidth = 30
        Columns("p:p").Select
        Selection.ColumnWidth = 60
        Columns("q:q").Select
        Selection.ColumnWidth = 60
        Columns("r:r").Select
        Selection.ColumnWidth = 26
         Columns("s:s").Select
        Selection.ColumnWidth = 18
        Columns("t:t").Select
        Selection.ColumnWidth = 14
        Columns("u:u").Select
        Selection.ColumnWidth = 12
        Columns("v:v").Select
        Selection.ColumnWidth = 18
        Columns("w:w").Select
        Selection.ColumnWidth = 14
        Columns("x:x").Select
        Selection.ColumnWidth = 14
        Columns("y:y").Select
        Selection.ColumnWidth = 50
'------Äæ¦ì½Õ¾ã¼e«×-§À


'------Äæ¦ì®æ¦¡½Õ¾ã-ÀY
        Columns("A:z").Select
        With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
       End With
'-------Äæ¦ì®æ¦¡½Õ¾ã-§À

    Exit For
End If
Next

'-------°Ï¤À-§À



'-------°Ï¤À-ÀY
For Each s In Sheets

If s.Name = "¤G" Then

                  
        
    Sheets("¤G").Select
    Cells.Replace What:="AU", Replacement:="='C:\U", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
            Rows("1:600").Select
            Selection.RowHeight = 20

        Columns("a:a").Select
        Selection.ColumnWidth = 14
        Columns("b:b").Select
        Selection.ColumnWidth = 30
        Columns("c:c").Select
        Selection.ColumnWidth = 26
        Columns("d:d").Select
        Selection.ColumnWidth = 12
        Columns("e:e").Select
        Selection.ColumnWidth = 50
        Columns("f:f").Select
        Selection.ColumnWidth = 10
        Columns("g:g").Select
        Selection.ColumnWidth = 20
        Columns("h:h").Select
        Selection.ColumnWidth = 10
        Columns("i:i").Select
        Selection.ColumnWidth = 20
        Columns("j:j").Select
        Selection.ColumnWidth = 10
        Columns("k:k").Select
        Selection.ColumnWidth = 20
        Columns("l:l").Select
        Selection.ColumnWidth = 10
         Columns("m:m").Select
        Selection.ColumnWidth = 20
        Columns("n:n").Select
        Selection.ColumnWidth = 30
        Columns("o:o").Select
        Selection.ColumnWidth = 30
        Columns("p:p").Select
        Selection.ColumnWidth = 60
        Columns("q:q").Select
        Selection.ColumnWidth = 60
        Columns("r:r").Select
        Selection.ColumnWidth = 26
         Columns("s:s").Select
        Selection.ColumnWidth = 18
        Columns("t:t").Select
        Selection.ColumnWidth = 14
        Columns("u:u").Select
        Selection.ColumnWidth = 12
        Columns("v:v").Select
        Selection.ColumnWidth = 18
        Columns("w:w").Select
        Selection.ColumnWidth = 14
        Columns("x:x").Select
        Selection.ColumnWidth = 14
        Columns("y:y").Select
        Selection.ColumnWidth = 50
            
        Columns("A:z").Select
        With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
       End With
              


    Exit For
End If
Next

'-------°Ï¤À-§À

http://forum.twbts.com/thread-23-1-1.html
¸ÔŪ«á§A´Nª¾¹D«ç»ò°µ¤F

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-4-22 10:23 ½s¿è

chin15¤j¤j
Ãö©ó±z¶Kªº¨º­Ó³sµ²¤å³¹ §Ú¦³¬Ý¹L
¥u¬O ¨º½g¦ü¥GµLªkÀHµÛ¼ÐÃDÄæ¦WºÙ§ó°Ê¸ÓÄæ¼e...
¨Ò¦p
        Columns("a:a").Select
        Selection.ColumnWidth = 14
        Columns("b:b").Select
        Selection.ColumnWidth = 30
³o¨âÄæ¦ì¨Ó»¡
ÁöµM sheet1 ©Msheet2 ³£¬O¤@¼Ë
¦ý¬O
        Columns("x:x").Select
        Selection.ColumnWidth = 14
        Columns("y:y").Select
        Selection.ColumnWidth = 50
«á­±³o´XÄæ¦ì «o·|¦]¬°¬¡­¶Ã¯¤£¦P¦Ó¦³©Ò·s¼W©Î´î¤Ö
¬G ¦pªG¥Î¨º½g¤å³¹ªº¤è¦¡¨Ó½s¼gªº¸Ü «Ü®e©ö·|²£¥Í®æ¦¡¿ù¶Ãªº°ÝÃD...
¦]¬°¦³¸ÕÅç¹L ©Ò¥H¤~·|¸ß°Ý¸Ó°ÝÃD ¤£¦n·N«ä
¥H¤U¦A¶K®t²§°Ï°ì
¦p
        Columns("h:h").Select
        Selection.ColumnWidth = 50
        Columns("i:i").Select
        Selection.ColumnWidth = 20
        Columns("j:j").Select
        Selection.ColumnWidth = 60
´N»Pµo¤åªº¨â¬qµ{¦¡½X®æ¦¡ ¦³©Ò®t²§

TOP

¦^´_ 3# mark15jill


    ¬O§_½Ð¼Ó¥D§âÀÉ®×(©Î½d¥»)¤W¶Ç~ ³o¼Ëª©¤j¤j­Ì¤ñ¸û§Ö³tÀ°§A¸Ñµª~
    µ¹±z«Øij¸Ó¦p¦ó³B²z¤ñ¸û¦n~
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-4-22 12:45 ½s¿è

§ÚªºÅv­­¤£¨¬ ©Ò¥H¥u¯àÂ^¨ú¨Çµ{¦¡½X¥X¨Ó...
¥Ø«e¸ÕµÛ¥Î°j°é¤è¦¡ ¹ï¨ä¬Û¦P³B§@³B²z(¦p ¬Û¦P®æ¦¡ªºÄæ¦ì)
¦Ü©ó®t²§³B ÁÙ¬O±o­Ó§O³]©w(¦p ®æ¦¡¤£¦PªºÄæ¦ì)...
¥Ø«e³B²zªººc·Q¤è¦V¤j·§¬°
¥Î        For Each s In Sheets   If s.Name = "" then §PÂ_¸Ó¬¡­¶Ã¯¬O§_¦s¦b...
¦A¥Î      For i =   ¥h°µ¬Û¦P³Bªº³B²z
¥u¬O°w¹ïÄæ¦ì­Ó§O¼e«× ÁÙ¬O±o°Ï¤À...
¤£¦n·N«ä §Úªº VBAµ{¦¡½s¼g¯à¤O ÁÙ¦b¾Ç²ß

TOP

­º¥ýÁn©ú¡A¤p¾Ç¥Í¤@¼Ë¥i¥H¤W¶ÇÀɮסA¨ÃµLÅv­­°ÝÃD

µ{¦¡ªº½s¼g­«³W«hªºÂç²M¡A­n¨ÌÄæ¦W§PÂ_¨Ó³]¸mÄd¼e¡A¨º´N­nª¾¹DÄæ¦Wªº³W«hÁ|¨Ò¨Ó»¡
¨C­Ó¤u§@ªí³£¦³©m¦WÄæ¦ì¡A¦ý©m¦WÄæ¦ì©Ò¦b¦ì¸m¬Ò¤£¦P
¦psheet1¬OAÄæ¡Asheet2¬OcÄæ¡Asheet3¬OgÄæ
¨º¦b¤u§@ªí°µ°j°éÀˬdÄæ¦ì®É
for each sh in sheets
   set a=sh.rows(1).find("©m¦W")  '¦b¼ÐÃD¦C§ä´M¼ÐÃD
   if not a is nothing then a.ColumnWidth =30  '¦pªG¼ÐÃD¦s¦b´N³]©wÄæ¼e
next
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

­ì¨Ó¤p¾Ç¥ÍªºÅv­­¥i¥H¤W¶Çªü... -.-  (©l²×»{¬°¤£¯à...
¦³§â®æ¦¡©M®t²§³B¥ÎÃC¦â¼Ð¥Ü
Àɮצ³¨â­ÓEXCEL
¤@­Ó¬° ®t²§³BÃC¦â¸Ñ»¡
¤@­Ó¬°°ò¦®æ¦¡...
¦b³Â·Ð¦U¦ì¤j¤j¤F...

vba´ú¸Õ.rar (47.26 KB)


¤£¹L....¦pªG¯à²¤Æªº¸Ü ¯àª½±µPO µ{¦¡½X¶Ü???

TOP

½Ð°Ý¤U¸ü¦¨¥\¶Ü «Ü©È¿ù»~..

TOP

¦^´_ 8# mark15jill
Àɮ׬O¨S°ÝÃD¡A¤£¹L§Aªº±Ô­z­nÅý¤H¬ÝÀ´®£©È«ÜÃø
§Ú»{¬°§A¬O¨Ì·Ó¤u§@ªí¦WºÙ(©Î§Ç¦C¸¹)§PÂ_­þ¨ÇÄæ¦ìªº¼e«×³]©w
©Ò¥H¡A°ò¥»¤W¥i¥ÎSelect case ¨Ó²¤Æµ{¦¡
  1. Sub nn()
  2. Dim Sh As Worksheet
  3. For Each Sh In Sheets
  4. With Sh
  5.         .Columns("a").ColumnWidth = 14
  6.         .Columns("b").ColumnWidth = 32
  7.         .Columns("c").ColumnWidth = 26
  8.         .Columns("d").ColumnWidth = 12
  9.         .Columns("e").ColumnWidth = 50
  10. Select Case .Index
  11. Case Is < 5
  12.         .Columns("s").ColumnWidth = 18
  13.         .Columns("t").ColumnWidth = 14
  14.         .Columns("u").ColumnWidth = 12
  15.         .Columns("v").ColumnWidth = 18
  16.         .Columns("w").ColumnWidth = 14
  17.         .Columns("x").ColumnWidth = 14
  18.         .Columns("y").ColumnWidth = 60
  19. Case Is < 6
  20.         .Columns("f").ColumnWidth = 10
  21.         .Columns("g").ColumnWidth = 24
  22.         .Columns("h").ColumnWidth = 10
  23.         .Columns("i").ColumnWidth = 24
  24.         .Columns("j").ColumnWidth = 10
  25.         .Columns("k").ColumnWidth = 24
  26.         .Columns("l").ColumnWidth = 10
  27.         .Columns("m").ColumnWidth = 20
  28.         .Columns("n").ColumnWidth = 30
  29.         .Columns("o").ColumnWidth = 30
  30.         .Columns("p").ColumnWidth = 60
  31.         .Columns("q").ColumnWidth = 60
  32.         .Columns("r").ColumnWidth = 26
  33. Case 5
  34.         .Columns("s").ColumnWidth = 12
  35.         .Columns("t").ColumnWidth = 60
  36. Case 6
  37.         .Columns("f").ColumnWidth = 20
  38.         .Columns("g").ColumnWidth = 20
  39.         .Columns("h").ColumnWidth = 50
  40.         .Columns("i").ColumnWidth = 20
  41.         .Columns("j").ColumnWidth = 60
  42. Case 7
  43.         .Columns("f").ColumnWidth = 10
  44.         .Columns("g").ColumnWidth = 24
  45.         .Columns("h").ColumnWidth = 10
  46.         .Columns("i").ColumnWidth = 24
  47.         .Columns("j").ColumnWidth = 10
  48.         .Columns("k").ColumnWidth = 24
  49.         .Columns("l").ColumnWidth = 10
  50.         .Columns("m").ColumnWidth = 20
  51.         .Columns("n").ColumnWidth = 30
  52.         .Columns("o").ColumnWidth = 30
  53.         .Columns("p").ColumnWidth = 60
  54.         .Columns("q").ColumnWidth = 60
  55.         .Columns("r").ColumnWidth = 26
  56.         .Columns("s").ColumnWidth = 18
  57.         .Columns("t").ColumnWidth = 14
  58.         .Columns("u").ColumnWidth = 12
  59.         .Columns("v").ColumnWidth = 18
  60.         .Columns("w").ColumnWidth = 14
  61.         .Columns("x").ColumnWidth = 14
  62.         .Columns("y").ColumnWidth = 60
  63. End Select
  64. End With
  65. Next
  66. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh


    ´N¦p¦PÀɮפº©Òªþ ¦³¨Ç¬¡­¶Ã¯ªº¸ê®ÆÄæ¦ì¨Ã¤£»Ý­n¨º»ò¦h
     ¨Ò¦p ²Ä¤@­Ó¬¡­¶Ã¯ ªºÄæ¦ì(¥]§t¸¹½XÄæ ±q A ¨ì Y)
           ²Ä4©Î5ªº¬¡­¶Ã¯ ¥u»Ý­n A¨ì J  ¦Ó¤w
      ¦]¤§«e¦³·Q¹L¥Î¨º­Ó¤èªk ¥u¬O»yªk¤£¤Ó¼ô±x´N¨S¥Î
      ·PÁ¤j¤j©Ò´£¨Ñªº¤èªk

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD