¦U¦ì¤j¤j¦n¡A§Ú·Q±NÀx¦s®æa1ªºÈ¡A¶Ç°e¨ì¨Ò¦pline©Î¥ô¦óµøµ¡¤W±¡A§Ú¬O¥Î¥H¤U¤è¦¡¼¶¼g¡A¦ý·|µo¥Í"¨S¦³¨Ï¥ÎÅv"
½Ð°Ý¸Ó¦p¦ó¸Ñ¨M???
©ÎªÌ¦³¤°»ò¤ñ¸û¦n¬Û®eªº«Øij¶Ü??
Sub sdfadf()
Dim a As Integer
Dim b As Integer
a = Sheets(1).Cells(1, 1).Value
b = Sheets(1).Cells(2, 1).Value
If a <> b Then
a = Orderfunction(a, b)
Sheets(1).Cells(3, 1).Value = a
End If
End Sub
¼Ò²Õ¡G
Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'For 32 Bit Systems
Public Function Orderfunction(neworder As Integer, oldorder As Integer) As Integer
If neworder > 0 Then
a = SetCursorPos(480, 160) '²¾°Ê¦Ü²Ä¤G¤U³æ®æ
mouse_event 2, 0, 0, 0, 0 '¤UÀ£¥ª·Æ¹«
mouse_event 4, 0, 0, 0, 0 '©ñÃP¥ª·Æ¹«
Sleep (500)
a = SetCursorPos(300, 70)
mouse_event 2, 0, 0, 0, 0 '¤UÀ£¥ª·Æ¹«
mouse_event 4, 0, 0, 0, 0 '©ñÃP¥ª·Æ¹«
SendKeys Range("a1").Text
Sleep (500)
SendKeys "{ENTER}"
Sleep (500)
end if
end function |