Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Not Working in Access point

Hi,

I have created a sample dashboard for uploading files through qlikview application. When I try to upload the files from my qlikview desktop Macros are  running fine and I am able to copy the file to the specified destination . After publishing, when I try to use the same functionality the macros are not executing on click of the buttons.

My code looks like this:

Created two buttons: 1) Choose File and 2) Upload File

On click of these buttons I am running the below macros:

Sub ChooseFile

  Set objDialog = CreateObject("UserAccounts.CommonDialog")

  If Not IsEmpty(objDialog) Then

  objDialog.Filter = "QVW Files|*.*"

  objDialog.InitialDir = "C:\"

  intResult = objDialog.ShowOpen

  

  If intResult = -1 Then

     ActiveDocument.GetVariable("vFileName").SetContent objDialog.FileName, True

  End If

  End If

End Sub

sub CopyFile

SourceFile = ActiveDocument.GetVariable("vFileName").GetContent.String

  Set fso = CreateObject("Scripting.FileSystemObject")

    fso.CopyFile SourceFile, "C:\Nagendra\Work\Right-Size\temp\", True

    ActiveDocument.GetVariable("vFileName").SetContent "", True

    End If

Set fso = Nothing

End sub

In server security settings both safe/unsafe macro option is enabled.

Any suggestions or help on this issue is highly appreciated

Thanks,

Nagendra

12 Replies
Not applicable
Author

Vikas,

In that case is there any work around so that the user can upload the documents from the dashboard.

Anonymous
Not applicable
Author

If you mean user download - yes.  It is in QMC - User Documents, Availability.  Same place where you define othe access methods (IE plugin, mobile,  etc.)

Not applicable
Author

Michael,

I want to provide users a provision to upload files from the system where they run this dashboard.

Do you have any suggestions or pointers on this.