- ©«¤l
- 22
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 71
- ÂI¦W
- 34
- §@·~¨t²Î
- Windows 11
- ³nÅ骩¥»
- Office 2021
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2021-12-10
- ³Ì«áµn¿ý
- 2025-4-4
|
¥»©«³Ì«á¥Ñ goner ©ó 2022-12-20 16:55 ½s¿è
·PÁÂAndyªº¼ö¤ßÀ°¦£¥H¤Î¦U¦ìªº¦^ÂСA²{¦b§ä¨ìì¦]Åo^^
À˵ø [°Ï°ìÅܼÆ] µøµ¡¡Aµo²{¨ä¤¤¦³ÓÅܼƦh¤F¤@Ó "Âù¤Þ¸¹¡A¦Ó¾ÉPµLªk¥¿½T§PÂ_¤u§@ªí¦WºÙ¡A½Õ¾ã«á¤w¥i¥¿±`¨Ï¥Î¥\¯à¡C- 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 = [A1] ' ³o¸Ì°t¦X¥¨¶° ¦¬¶°15Ó¤u§@ªí¦W() ¨Ï¥Î¡A»`¶°¥Ø«e¬¡¶Ã¯©Ò¦³¤u§@ªí¦WºÙ¡C
- 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 ' ¥H즳¬¡¶Ã¯¨Ï¥Î¡A©Ò¥H¤£·s¼W¬¡¶Ã¯¡C
- [A1] = "V=""" & Na & "" ' ³o¸Ì¦³°µ½Õ¾ã¡Cì[A1] = "V = """ & Na & """" ÅܼƷ|¦h¤F¤@Ó "Âù¤Þ¸¹¡A¦Ó¾ÉPµLªk¥¿½T§PÂ_¤u§@ªí¦WºÙ¡C
- End Sub
- '§â 15Ó¤u§@ªí¦Wªº¦r¦ê »P¤W¤è¬õ¦r¸m´«±¼
½Æ»s¥N½X ¥H¤U¬O¤@¦¸ ¨ú®øÁôÂà ©Ò¦³¤u§@ªíµ{¦¡½X¡A¨Ñ°Ñ¦Ò¡C- Sub UnhideAllSheets()
- Dim UAS As Worksheet
- For Each UAS In ActiveWorkbook.Worksheets
- UAS.Visible = xlSheetVisible
- Next UAS
- End Sub
½Æ»s¥N½X |
|