0

I'm trying to translate a vba macro into vbscripting. That macro works when executing it from Excel VB but it uses nothing from Excel. When I convert

Private Declare PtrSafe Function GetCursorPos Lib "user32.dll" ( _
 ByRef lpPoint As POINTAPI) As Long

into

Private Declare Function GetCursorPos Lib "user32.dll" ( _
 ByRef lpPoint)

I get an error: wsf(15, 18) Error de compilación de Microsoft VBScript: Se esperaba un final de instrucción (I'm working in spanish environment)

(15, 18) points to

Function GetCursorPos Lib "user32.dll" ( _
 ByRef lpPoint)

Is it possible to use mouse events in Vbscripting? If yes, how ought I to do it?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
GGG
  • 35
  • 7
  • 1
    For user692942: Yes, I think your link answered my question. Thank you, very much. – GGG Jun 28 '21 at 16:19
  • For BigBen: I want to use VBS because the VB code I'm using don't need specific functions from Excel – GGG Jun 28 '21 at 16:21

0 Answers0