|
http://www.vbalab.net/vbaqa/c-board.cgi?cmd=one;no=45133;id=excel
↑これ(httpを半角に)のコードを改造したい、ということですか ?
Declare Sub Sleep Lib"kernel32"(Byval dwMilliseconds As Long)
Sub test()
Dim i As Integer
Dim Lp As Single, Tp As Single
Dim WshShell As Object
With ActiveSheet.Shapes
If .Count = 0 Then Exit Sub
Set WshShell = CreateObject("WScript.Shell")
With .Item(1)
Lp = .Left: Tp = .Top
.Top = .Parent.Range("B2").Top
.Left = .Parent.Range("B2").Left
WshShell.Popup "図形の移動を開始 !", 2
For i = 1 To 100
.IncrementLeft 0.75
DoEvents: Sleep 200
Next i
WshShell.Popup "図形の移動を終了" & _
vbLf & "元の位置へ戻ります", 3
.Left = Lp: .Top = Tp
End With
End With
Set WshShell = Nothing
End Sub
で、どうかな ?
Popupメソッドなので、メッセージは指定した秒数後に自動的に消えます。
|
|