- ©«¤l
- 228
- ¥DÃD
- 73
- ºëµØ
- 2
- ¿n¤À
- 333
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 10
- ³nÅ骩¥»
- Office 2000, 2019
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¹ü¤Æ¿¤
- µù¥U®É¶¡
- 2013-7-18
- ³Ì«áµn¿ý
- 2024-10-13
|
- Option Explicit
- Option Base 1
- Option Compare Text
- Public Sub S_¤@ºû°}¦C§Ö³t´¡¤Jéw±Æ§Ç_01(ByRef ì©l¤@ºû°}¦C As Variant, ByVal °_ As Long, ByVal ¨´ As Long, ByVal »¼¼W©Î»¼´î As String)
- On Error Resume Next
-
- If °_ >= ¨´ Then
- Exit Sub
- End If
-
- '------------------------------------------------------
-
- Dim X As Long
-
- Dim ¯Á¤Þ°}¦C() As Long
-
- '------------------------------------------------------
-
- ReDim ¯Á¤Þ°}¦C(°_ To ¨´) As Long
-
- For X = °_ To ¨´
- ¯Á¤Þ°}¦C(X) = X
- Next X
-
- '------------------------------------------------------
-
- Select Case »¼¼W©Î»¼´î
- Case "»¼¼W"
- ¤@ºû°}¦C§Ö³t´¡¤Jéw»¼¼W±Æ§Ç ì©l¤@ºû°}¦C, ¯Á¤Þ°}¦C, °_, ¨´
- Case "»¼´î"
- ¤@ºû°}¦C§Ö³t´¡¤Jéw»¼´î±Æ§Ç ì©l¤@ºû°}¦C, ¯Á¤Þ°}¦C, °_, ¨´
- End Select
-
- '------------------------------------------------------
-
- Dim ½Æ»sì©l¤@ºû°}¦C As Variant
-
- ½Æ»sì©l¤@ºû°}¦C = ì©l¤@ºû°}¦C
-
- For X = °_ To ¨´
- ì©l¤@ºû°}¦C(X) = ½Æ»sì©l¤@ºû°}¦C(¯Á¤Þ°}¦C(X))
- Next X
- End Sub
- Public Sub S_¤Gºû°}¦C§Ö³t´¡¤Jéw±Æ§Ç_01(ByRef ì©l¤Gºû°}¦C As Variant, ByVal ±Æ§Çºû«× As Long, ByVal ±Æ§ÇÁäÈ As Long, ByVal °_ As Long, ByVal ¨´ As Long, ByVal »¼¼W©Î»¼´î As String)
- On Error Resume Next
-
- If °_ >= ¨´ Then
- Exit Sub
- End If
-
- '------------------------------------------------------
-
- Dim X As Long
- Dim Y As Long
-
- Dim Â^¨ú¦¨¤@ºû°}¦C As Variant
- Dim ¯Á¤Þ°}¦C() As Long
-
- '------------------------------------------------------
-
- ReDim Â^¨ú¦¨¤@ºû°}¦C(°_ To ¨´) As Variant
- ReDim ¯Á¤Þ°}¦C(°_ To ¨´) As Long
-
- If ±Æ§Çºû«× = 1 Then
- For X = °_ To ¨´
- Â^¨ú¦¨¤@ºû°}¦C(X) = ì©l¤Gºû°}¦C(X, ±Æ§ÇÁäÈ)
- ¯Á¤Þ°}¦C(X) = X
- Next X
- Else
- For Y = °_ To ¨´
- Â^¨ú¦¨¤@ºû°}¦C(Y) = ì©l¤Gºû°}¦C(±Æ§ÇÁäÈ, Y)
- ¯Á¤Þ°}¦C(Y) = Y
- Next Y
- End If
-
- '------------------------------------------------------
-
- Select Case »¼¼W©Î»¼´î
- Case "»¼¼W"
- ¤@ºû°}¦C§Ö³t´¡¤Jéw»¼¼W±Æ§Ç Â^¨ú¦¨¤@ºû°}¦C, ¯Á¤Þ°}¦C, °_, ¨´
- Case "»¼´î"
- ¤@ºû°}¦C§Ö³t´¡¤Jéw»¼´î±Æ§Ç Â^¨ú¦¨¤@ºû°}¦C, ¯Á¤Þ°}¦C, °_, ¨´
- End Select
-
- '------------------------------------------------------
-
- Dim ½Æ»sì©l¤Gºû°}¦C As Variant
-
- ½Æ»sì©l¤Gºû°}¦C = ì©l¤Gºû°}¦C
-
- If ±Æ§Çºû«× = 1 Then
- For X = °_ To ¨´
- For Y = LBound(ì©l¤Gºû°}¦C, 2) To UBound(ì©l¤Gºû°}¦C, 2)
- ì©l¤Gºû°}¦C(X, Y) = ½Æ»sì©l¤Gºû°}¦C(¯Á¤Þ°}¦C(X), Y)
- Next Y
- Next X
- Else
- For Y = °_ To ¨´
- For X = LBound(ì©l¤Gºû°}¦C, 1) To UBound(ì©l¤Gºû°}¦C, 1)
- ì©l¤Gºû°}¦C(X, Y) = ½Æ»sì©l¤Gºû°}¦C(X, ¯Á¤Þ°}¦C(Y))
- Next X
- Next Y
- End If
- End Sub
½Æ»s¥N½X |
|