Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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

0 Replies