Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
whiteline
Master II
Master II

Hi.

Does the CopyFile work when the vFileName is set properly ?

Not applicable
Author

Hi I haven't test that seperately on the access point..but when I try it from my desktop version it is working fine.

Even if doesn't work I will connect to the destination ftp server and then place the file using put command.

Any workaround for the file browsing option.

whiteline
Master II
Master II

I've asked about file copy to ensure that everything works fine and the problem is with dialog.

Not applicable
Author

I have tested it in my local machine it works fine. As of now the problem is with dialog box.

Anonymous
Not applicable
Author

What is the client?  These macros can work only in IE Plugin.

Next, what do you see on Ctrl+Shift+M?  It must be system access.

vikasmahajan

Macros will not work in Access Point.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Are you using Plugin or WebView (Ajax)?

Not applicable
Author

Michaeal,

I tested the dashboard in both chrome and IE using plugin. In both the cases this doesn't work. Can you suggest some way to provide users for choosing file to upload.

And Module security is System Level.

Not applicable
Author

Jerry, I have tested using both the clients.