View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default time interval other than forms

Here is the code I currently use:

Sub WaitTime()
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
sitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait sitTime
End Sub

Sub TestShape()
Set myDocument = Worksheets(4)
myDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200
myDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100)
Set newWordArt =
myDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1,
Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse,
FontItalic:=msoFalse, Left:=10, Top:=10)
Counter = 0
Do
With myDocument.Shapes(1)
.IncrementLeft Counter + 70
.IncrementTop (Counter * -1) + (-50)
.IncrementRotation 30
End With
Counter = Counter + 25
WaitTime
Loop While Counter < 100
Worksheets(4).Shapes(1).Delete
Worksheets(4).Shapes(2).Delete
End Sub

As you can see, one second is the least time interval I can get because of
the time serial limitation. I would like to cut the time interval to a half
second. Is there code for this without using a form?