VBA freak Guest
|
Posted: Mon Feb 16, 2004 3:52 am Post subject: Have a problem again with translating into Starbascic |
|
|
Hellow I can't find the right translation for this code into Starbasic I alway's have ERRORS can you translate this so it works perfect into Open Office???
| Code: |
Sub ExecuteQuery(Qu, Blad)
'********************************************************************************
'* functie welke de queries uitvoert en copieert naar de overeenstemmende sheet *
'********************************************************************************
Dim BestandBron As Variant
BestandBron = ActiveWindow.Caption
Dim MyObj As Object
Set MyObj = CreateObject("excdump.application")
Dim dummy As Variant
SqlPath = "i:\plapp\sql\rnd\"
SqlPath = SqlPath & Qu
SqlPath = SqlPath & ".sql"
dummy = MyObj.Putsqlexc(SqlPath, 2, Variables)
Sheets(Blad).Select
Cells.Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ChDir "D:\PLApp"
Workbooks.Open FileName:="D:\PLApp\resulttmp.xls"
Cells.Select
Selection.Copy
Windows(BestandBron).Activate
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Windows("resulttmp.xls").Activate
Cells.Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveWorkbook.Save
ActiveWindow.Close
Set MyObj = Nothing
End Sub
| [/code] |
|