OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Have a problem again with translating into Starbascic

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
VBA freak
Guest





PostPosted: Mon Feb 16, 2004 3:52 am    Post subject: Have a problem again with translating into Starbascic Reply with quote

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]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group