• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

API Call Question

I was reading this article on creating Splash Screen for Excel Application. They were talking about using API call. Again, I learning about Excel and doing a lot of downloading of sample example files.
http://excel.tips.net/T003167_Creating_a_Splash_Screen.html

How can you determine if an API Call is being made from within your excel spread sheet or vba form.

Is there anyway some can be making an API call and make it hidden. How do you know the one that come with Microsoft product.
 
API Calls can only be made from VBA
API Calls can be to any registered API's on the PC installed by any program

VBA Routines can be locked but not hidden
That is you can know there is a VBA Routine as the file type will be either *.xlsm or *.xlsb, but when going to the VBA environment it will show you the VB Modules, but you wont be able to access them without a password.
Under that scenario you can't know what the code is doing

I'm unaware of any method for watching what API's are being accessed, but it sounds like there maybe techniques to do that, check in Google
 
API Calls can only be made from VBA
API Calls can be to any registered API's on the PC installed by any program

VBA Routines can be locked but not hidden
That is you can know there is a VBA Routine as the file type will be either *.xlsm or *.xlsb, but when going to the VBA environment it will show you the VB Modules, but you wont be able to access them without a password.
Under that scenario you can't know what the code is doing

I'm unaware of any method for watching what API's are being accessed, but it sounds like there maybe techniques to do that, check in Google
Where should I look to see existing API call.
 
API's are declared at the Top of a Module and prior to an Subroutine or Function definitions and are highlighted by the Declare Function (32 bit) or Declare Ptrsafe Function (64 bit) keywords

They will typically look like:
Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare PtrSafe Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr

Note there is no need for End Function statements
 
Back
Top