Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Private Function IsUserform(ByRef Obj As Object) As Boolean
  2.  
  3. If TypeOf Obj Is MSForms.UserForm Then
  4. IsUserform = True
  5. End If
  6.  
  7. End Function
  8.  
  9. Case Else
  10.  
  11. If TypeOf ControlOrForm Is MSForms.UserForm Then
  12. Set Form = ControlOrForm
  13. End If
  14.  
  15. Private Function Dict(ParamArray KeyValue() As Variant) As Scripting.Dictionary
  16.  
  17. 'CHECK IF THERE IS EVEN PARAMETERS
  18. Dim arrayCount As Long
  19. arrayCount = UBound(KeyValue) - LBound(KeyValue) + 1
  20.  
  21. If Not arrayCount Mod 2 = 0 Then
  22. Debug.Print "Function Dict() requires an even amount of key value arguments." _
  23. & " Only provided " & arrayCount
  24. Exit Function
  25. End If
  26.  
  27. If arrayCount Mod 2 <> 0 Then
  28. Err.Raise 5, TypeName(Me), "Invalid parameters: expecting key/value pairs, but received an odd number of arguments."
  29. End If
  30.  
  31. Public Enum EmittedEvent
  32. Click
  33. DoubleClick
  34. MouseMove
  35. MouseOut
  36. MouseOver
  37. MouseDown
  38. MouseUp
  39. KeyUp
  40. KeyDown
  41. Focus
  42. Blur
  43. End Enum
  44.  
  45. Public Sub EmitEvent(ByRef Control As Object, ByVal EventType As EmittedEvent, ByRef EventParameters As Scripting.Dictionary)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement