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

[µo°Ý] ¦bVBA¤¤¡A¦p¦ó¨Ï¥Î¥¨¶°ÁôÂó¡¥÷¤u§@ªí¡B¤Î¨ú®øÁôÂÃ¥þ³¡¤u§@ªí¡H

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2022-12-20 10:23 ½s¿è

¦^´_ 1# goner


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P±¡¹Ò
«á¾ÇÂǦ¹ÃD¾Ç²ß¨ì«Ü¦hª¾ÃÑ,½m²ß¤F¦r¨å.¤@ºû°}¦C»PSelect Case,¾Ç²ßµ²ªG½Ð«e½ú¸Õ¸Õ¬Ý
¿é¤Jµ¡:


¿é¤Jµ¡¿é¤J 1 µ²ªG:


¿é¤Jµ¡¿é¤J 2µ²ªG:


¨Ì¦¹Ãþ±À¨ì 4
¿é¤J 0 «h¬°¥þ³¡¤u§@ªí³£Åã¥Ü

Option Explicit
Sub ¤u§@ªíÅã¥ÜÁôÂñ±¨î()
Application.ScreenUpdating = False
Dim N%, i&, xR, V, Y, Z, No, G1, G2, G3
No = InputBox("½Ð¿é¤J 0~4 ¼Æ¦r!", "¤u§@ªíÅã¥ÜÁôÂñ±¨î", 0)
If No < 0 Or No > 4 Then Exit Sub
Set Y = CreateObject("Scripting.Dictionary")
V = ",¤u§@ªí1,¤u§@ªí2,¤u§@ªí3,¤u§@ªí4,¤u§@ªí5,¤u§@ªí6,¤u§@ªí7,¤u§@ªí8,¤u§@ªí9,¤u§@ªí10,¤u§@ªí11,¤u§@ªí12,¤u§@ªí13,¤u§@ªí14,¤u§@ªí15"
V = Split(V, ",")
For Each xR In [A1:E1]
   Z = Split(xR.Address, "$")(1)
   Y(Z) = Array(V(1 + N), V(2 + N), V(3 + N))
   N = N + 3
Next
For Each xR In ActiveWorkbook.Worksheets
   xR.Visible = True
Next
If No = 0 Then GoTo 111
Select Case No
Case 1: G1 = Y("C"): G2 = Y("D"): G3 = Y("E")
Case 2: G1 = Y("B"): G2 = Y("D"): G3 = Y("E")
Case 3: G1 = Y("B"): G2 = Y("C"): G3 = Y("E")
Case 4: G1 = Y("B"): G2 = Y("C"): G3 = Y("D")
End Select
Sheets(G1).Visible = False
Sheets(G2).Visible = False
Sheets(G3).Visible = False

111
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Set Y = Nothing
Erase V
End Sub


'°õ¦æ¤U¦Cµ{¦¡½X¥i¨ú±o 15­Ó¤u§@ªí¦Wªº¦r¦ê
Sub ¦¬¶°15­Ó¤u§@ªí¦W()
Dim i&, Na$
For i = 1 To 15
   Na = Na & "," & Sheets(i).Name
Next
Workbooks.Add
[A1] = "V = """ & Na & """"
End Sub
'§â 15­Ó¤u§@ªí¦Wªº¦r¦ê »P¤W¤è¬õ¦r¸m´«±¼
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD