Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Not able to export txt file without creating a folder

Hello all,

I am not able to export a txt file either on the desktop or in the drives without creating a folder.

How can i export the txt file without creating a folder ?

        or

How can i display the error message as " Folder should be selected"  for the following macro

Function GroupFolders()

Dim objShell

Dim ssfWINDOWS

Dim objFolder

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.BrowseForFolder(0, "Example Select Folder", 0, strRootPath)

If (Not objFolder Is Nothing) Then

'Add code here.

'MSGBOX (objFolder.Title)

MSGBOX "Data has been Transfered to "& objFolder.ParentFolder.ParseName(objFolder.Title).Path

'Set V1 = ActiveDocument.GetVariable("vGroup1Dir")

     Set obj1= ActiveDocument.GetSheetObject("CH20")

obj1.Export objFolder.ParentFolder.ParseName(objFolder.Title).Path&"\"&Date()&"_"&replace(Time(),":","")&".txt",","

    ' Msgbox("Data Has Been Transfered to ")

End If

Set objFolder = Nothing

Set objShell = Nothing

End Function

I hope some 1 can help me

Thank you

0 Replies