I am unable make the Macro created in Excel to work with OpenOffice. I have tried the link http://www.business-spreadsheets.com/vba2oo.asp to convert the code but even that failed. Could you please help me with this.
I just wanted to list all the files in a Folder (including Subfolders) in to the calc sheet. Please see the original VB code i was using in Excel. (attached) and please send me the code which will work in OO.
Sub JAD() Dim fs As FileSearch, i As Long 'ws As Worksheet, Set fs = Application.FileSearch With fs .SearchSubFolders = True ' set to true if you want sub-folders included .Filename = "*.jad" .LookIn = "E:\Task\Volleyball" 'modify this to where you want to search If .Execute > 0 Then ' Set ws = Worksheets.Add For i = 1 To .FoundFiles.Count Cells(i + 1, 26) = Mid$(.FoundFiles(i), InStrRev(.FoundFiles(i), "\") + 1) Next Else MsgBox "No files found" End If End With End Sub