Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

macro on browser

We are trying to log users that opens documents and we are using triggers "onOpen" trigger to call LogLogin Sub

however , client based qlikview also open in server runs this macro, but access point ( from web browser ) not working .

Also we tried to run this macro with button , same result..

Any Idea ?

Public Sub LogLogin

    on error resume next

    Dim DocName

    Dim UserName

    DocName=ActiveDocument.Name

    set temp = ActiveDocument.GetApplication.GetProperties

    UserName=temp.UserName

    Dim mConnection

    Set mConnection = CreateObject("ADODB.Connection")

    mConnection.Open "xxxxxxxxxxxxx","xxxxxxxxxxx","xxxxxxxxxxxxxx"

    Dim sql

    sql="INSERT INTO xxxxxxxx (UserName,DocumentName) values ('" & UserName & "','" & DocName & "')"

    mConnection.Execute sql

        mConnection.close

    Set mConnection = Nothing

    if Err<>0 then

        msgbox err

    end if

   

end Sub

Labels (1)
0 Replies