Friday, December 04, 2009

How to emulate F9 key

Sometimes F9 makes good staff for us, so here is an example (I really don't remember where I got it).

'F9
Declare Function VkKeyScan Lib "User32.dll" Alias "VkKeyScanA" ( Byval char As Integer ) As Integer
Declare Function MapVirtualKey Lib "User32.dll" Alias "MapVirtualKeyA" ( Byval wCode As Long, Byval wMapType As Long ) As Long
Declare Sub keybd_event Lib "User32.dll" ( Byval Virtual As Integer, Byval OEMScan As Integer, Byval Flags As Long, Byval ExtrInfo As Long )
Const KE_KEYDOWN& = 0
Const KE_KEYUP& = 2 

Sub F9
  On Error Goto errorproc

  Dim vk As Long
  Dim sc As Integer

  vk = &H78

  sc = Cint( MapVirtualKey( vk&, 0 ) )

  Call keybd_event( Cint( vk& ), sc%, KE_KEYDOWN&, 0 )
  Yield
  Call keybd_event( Cint( vk& ), sc%, KE_KEYUP&, 0 )
  Yield

  endofsub:
    Exit Sub
  errorproc:
    Msgbox "Error #" & Err & " on line " & Erl & " in function " & Lsi_info(2) & " : " & Error, 48, "Runtime error"
  Resume endofsub 
End Sub

Thursday, December 03, 2009

Online JS validator

I have never used JS validator before (just because I did not think about it previously) . Today I decided to use one of them. I looked around and found JSLint. It is really good tools for validation of JS. I like it ! I recomend to use it to everybody, it gives very good results.

http://www.jslint.com/

Wednesday, December 02, 2009

Re-open document using @Formula

Need to update document using re-open approach?

here is easy way:
...
@Command([FileSave]);
@Command([SwitchForm]; currentForm)


I like this approach, especially because I've never thought about such way.

Wednesday, November 04, 2009

Would you like to add google analytics to your blog (blogspot)?

Today I decided to add 'Google Analytics' to my blog, so I looked around and found couple articles that describes how to do it.

I would like to share it to all who probably think about it: setting up google analyics on your blog

Tuesday, November 03, 2009

How @UserAccess can determine No Access level?

One my fellow asked me how to determine that user don't have access to database using only @formula. So I want to share how it can be done.
We should just check it on @IsError(@UserAccess(..)) and it will return 1 for cases if you don't have access to database at all.