Beispiel: VBA - Excel - Lauftext in einer Zelle - Visual

Transcrição

Beispiel: VBA - Excel - Lauftext in einer Zelle - Visual
'Beispiel: VBA - Excel - Lauftext in einer Zelle
'Fügen Sie folgenden Text in ein Modul ein, und belegen Sie einen Button mit
'dem Prozeduraufruf
'
'
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Private Sub CommandButton1_Click()
Call ScrollCellText("A1")
End Sub
Private Sub ScrollCellText(ByVal Cell As String)
Dim MyRange
As Range
Dim cnt
As Integer
Application.EnableCancelKey = xlErrorHandler
Set MyRange = Range(Cell)
On Error GoTo procErr
For cnt = 1 To 5000
MyRange.Value = Right$(MyRange.Value, Len(MyRange.Value) - 1) + Left$(MyRange.Value, 1)
Call Sleep(100)
Next
procErr:
MsgBox (Err.Description)
End Sub
Download from:
Server:
http://www.visual-basic5.de
http://vbclassic.piranho.com
all rights reserved by [ prelles basics – germany – heinz prelle - 30655 hannover ] – www.visual-basic5.de