QlickView Buttons - Macros

1

I'm working on Qlikview and I have a button that runs a macro that creates folders.

But I need to make more buttons inside the same Qlikview document that copy and paste some files (that's already done)

Then, I need at least 10 buttons inside the Qlikview document, and when I create another button, it automatically acquires the script of the button already created (the one that creates folders)

How can I solve that?

This is the VBscript code that creates folder :

Option Explicit
Dim fso,a 


Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FolderExists("U:\FTP\Revenue_Management\Archivos_de_Salida\Sem_"& Year(Date) & Right("0" & Month(Date),2) & Right("0" & Day(Date),2) &"")=True     Then

a=msgbox("Carpeta ya Existe")

Else
fso.CreateFolder "U:\FTP\Revenue_Management\Archivos_de_Salida\Sem_"& Year(Date) & Right("0" & Month(Date),2) & Right("0" & Day(Date),2) &""
msgbox("Carpeta Creada")
End If  

This is the code that copies the files :

Option Explicit
dim ruta1, ruta_final,a, oFSO
ruta1 = "U:\FTP\Revenue_Management\E_Mailing\Archivos_de_Entrada\Empresarios\Sem_"& Year(Date) & Right("0" & Month(Date),2) & Right("0" & Day(Date),2) &"\*.html"
ruta_final = "U:\FTP\Revenue_Management\Archivos_de_Salida\Sem_"& Year(Date) & Right("0" & Month(Date),2) & Right("0" & Day(Date),2) &""

Set oFSO = CreateObject("Scripting.FileSystemObject")

If (oFSO.FileExists("ruta1"))=False Then
 oFSO.CopyFile (ruta1) , (ruta_final)
 Msgbox("Archivo copiado")
Else

 Msgbox("Archivo no existe")
 end If
    
asked by Nicole H. 16.03.2017 в 14:14
source

0 answers