Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Keana Schmidt   on Feb 07 In MS Office Category.

  
Question Answered By: Nagaraju Iyaner   on Feb 07

I attempted to write this subroutine  which is called when the Shape is
clicked , or called again when the Shape is double  clicked.

Public ClickTime As Integer

Sub DoubClickShape()
Dim PauseTime, Start, Finish, TotalTime as single
Start = Timer
PauseTime = 0.5

If ClickTime >= 1 Then
ClickTime = 2
Else
ClickTime = 1
End If

Do While Timer < Start + PauseTime
DoEvents ' click  the shape again or just don't click anything.
Loop

If ClickTime = 2 Then
MsgBox "Double Click" ' OR other subroutine
ClickTime = 0
End
Else
MsgBox "Single Click" ' OR other subroutine
ClickTime = 0
End If

End Sub

The Sub can work  but it is too slow to capture the double click, so
let me see if I can work out your suggestion.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Single Click & Double Click on Shapes Or get search suggestion and latest updates.


Tagged: