Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
The below code works fine all type of files other than QVW, QVD and CSV.
Is it not possible to copy a QVW file from one location to another location using vb scripts?
Sub File_Browser()
Dim objShell
Dim strFileName
Dim strFilePath
Dim objFile
Set objShell = CreateObject("Shell.Application")
Set objFile = objShell.BrowseForFolder(0, "Choose a file:", 16384)
strFileName = objFile.Title
strFilePath = objFile.self.Path
MsgBox "Just the file name: " & strFileName & vbCrLf & "The full path: " & strFilePath
Set objFileName = Nothing
Set objFilePath = Nothing
Set objShell = Nothing
End Sub
Thanks,
Rakul.
You could use code like this:
dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile SoureFileWithFullPath, TargetFileWithFullPath
Set objFSO = Nothing
- Marcus
Marcus,
Thanks for writing back. Please let me know is there any way I can invoke File Browser dialog box inside Qlikview VB script, through which any other Qlikview file can be selected dynamically.
Thanks,
Rakul.
You might need another parameter in BrowseForFolder, like:
Set objFile = objShell.BrowseForFolder(0, "Choose a file:", &H4000)
See also: Using the Browse For Folder Dialog Box. Alternative would be this here: VBScript Scripting Techniques: File Open Dialog.
- Marcus