•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 374,571 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,550 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser:
Another look at BCX basic. Here we use COM support to manipulate Excel. In other words, from within the basic code we are entering a few numbers into the Excel spreadsheet and add them up. Of course you can do much more powerful stuff. With COM support you can also access Word and the Internet Explorer from your basic program.
' do some basic data manipulations with EXCEL using COM ' (you have to have the EXCEL program installed on your computer) ' needs BCX basic ver 5.05.05 or later, download package from: ' http://www.rjpcomputing.com/programming/bcx/devsuite.html ' COM credit goes to: Ljubisa Knezevic BCX_SHOW_COM_ERRORS(TRUE) DIM app AS Object set app = CreateObject("Excel.Application") app.workbooks.add app.visible = true app.ActiveSheet.Cells(1,1).Value = "BCX does Excel ..." app.ActiveSheet.Cells(3,1).Value = 12.3 app.ActiveSheet.Cells(4,1).Value = 7.4 app.ActiveSheet.Cells(5,1).Value = "-----------" app.ActiveSheet.Cells(6,1).Value = "=sum(a3:a4)" ' sum it up msgbox "Press OK to close Excel" ' close down Excel SLEEP(100) app.activeworkbook.saved = true ' fake it app.quit set app = Nothing
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)