| CAPITAL Connector | ||
|
CAPITAL Connector (based on OLE COM Server technology) can
plug into all popular software development environments, including Visual
Basic, .NET, C++, PHP and many others. You can even access CAPITAL databases and services from within popular applications such as Microsoft Excel and Word. |
||
| Sample Visual Basic For Applications Program | ||
Connecting to CAPITAL Office from within other applications is easy: Sub CapitalConnector() |
||
| Access Your CAPITAL database from within Excel! | ||
| Upon execution from within Excel: | ||
![]() |
||
| Producing this output: | ||
![]() |
||
| Excel application code below: | ||
|
Sub CapitalConnector() Dim capital As Object Dim InvNo As String Dim InvDate As Date Dim InvAmount As Currency Dim InvAcc As String Dim InvUnpaid As Currency Dim AccountCode As String Set capital = CreateObject("CapitalOfficeClass") capital.ConnectPath ("c:\capital") capital.OpenCompany ("sample") Rem Open required table capital.OpenTable ("Invoice") AccountCode = InputBox("Enter the customer account code to list unpaid transactions payments for.") AccountCode = Left(UCase(AccountCode) + String(8, " "), 8) If Not capital.Find(AccountCode, "Invoice", 2) Then MsgBox ("No match found") GoTo Finished End If Range("A1").Select ActiveCell.Value = "Account" ActiveCell.Offset(0, 1).Activate ActiveCell.Value = "Tran No." ActiveCell.Offset(0, 1).Activate ActiveCell.Value = "Date" ActiveCell.Offset(0, 1).Activate ActiveCell.Value = "Amount" ActiveCell.Offset(0, 1).Activate ActiveCell.Value = "Balance Owed" Range("A1:E1").Font.Bold = True Range("A2").Select Do While (capital.Read("ACCCODE", "Invoice") = AccountCode) If Not capital.Ispaid("Invoice") Then InvAcc = capital.Read("Acccode", "Invoice") InvNo = capital.Read("Invoiceno", "Invoice") InvNo = capital.TranStr(InvNo) InvDate = capital.Read("Date", "Invoice") InvAmount = capital.Read("Invtot", "Invoice") InvUnpaid = capital.Unpaid("Invoice") ActiveCell.Value = InvAcc ActiveCell.Offset(0, 1).Activate ActiveCell.Value = InvNo ActiveCell.Offset(0, 1).Activate ActiveCell.Value = InvDate ActiveCell.Offset(0, 1).Activate ActiveCell.Value = InvAmount ActiveCell.Offset(0, 1).Activate ActiveCell.Value = InvUnpaid ActiveCell.Offset(1, -4).Activate End If If Not capital.Skip(1, "Invoice") Then Exit Do End If Loop Finished: Range("A1").Select Set capital = Nothing End Sub |
||
Business Software
You Won't Outgrow
CAPITAL Office is a trademark of Capital Office Business Software. All other products mentioned are registered trademarks or trademarks of their respective companies. Copyright © 1985-2008 Will Nitschke for CAPITAL Office Business Software. All rights reserved. Capital Office Business Software Home Page: www.capitaloffice.com.au |
||