Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone please explain what each of this actually does?
Private Declare Function FindWindowA& Lib "User32" _ (ByVal lpClassName$, ByVal lpWindowName$) Private Declare Function SetWindowLongA& Lib "User32" _ (ByVal hWnd&, ByVal nIndex&, ByVal dwNewLong&) Private Declare Function OpenClipboard& Lib "User32" (ByVal hWnd&) Private Declare Function EmptyClipboard& Lib "User32" () Private Declare Function CloseClipboard& Lib "User32" () Private Declare Sub keybd_event Lib "User32" (ByVal bVk As Byte _ , ByVal bScan As Byte, ByVal dwFlags&, ByVal dwExtraInfo&) Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
These are so called API declarations to register certain functions in
operaring system libraries. For syntax and explanations see: www.AllApi.Net The difference re ByVal / ByRef: if you pass a parameter ByRef the pointer (reference to memoery address) to the original variable is passed. ByVal: a New variable is created. the Value of the orignal variable is then assigned to that new variable... This not only relates to API declarations, but is the same for VBA. (where passsing it ByREF is the default) Search VBA hlep for ByRef and you should have a nice read. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Newbie wrote : Can someone please explain what each of this actually does? Private Declare Function FindWindowA& Lib "User32" _ (ByVal lpClassName$, ByVal lpWindowName$) Private Declare Function SetWindowLongA& Lib "User32" _ (ByVal hWnd&, ByVal nIndex&, ByVal dwNewLong&) Private Declare Function OpenClipboard& Lib "User32" (ByVal hWnd&) Private Declare Function EmptyClipboard& Lib "User32" () Private Declare Function CloseClipboard& Lib "User32" () Private Declare Sub keybd_event Lib "User32" (ByVal bVk As Byte _ , ByVal bScan As Byte, ByVal dwFlags&, ByVal dwExtraInfo&) Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
REPSOT?? Sub Worksheet_Change(ByVal Target As Range) | Excel Discussion (Misc queries) | |||
ByVal Target Range Great Code but need Help | Excel Discussion (Misc queries) | |||
what does (ByVal Target As Range) mean | Excel Programming | |||
Curious use of ByVal keyword in VBA event | Excel Programming | |||
Is ByVal always better if ByRef isn't necessary | Excel Programming |