Contoh Program Sederhana Visual Basic 2008 6,1/10 4310 reviews
-->

Summary

This article demonstrates how to create and manipulate Excel by using Automation from Visual Basic.

Net 2008 Contoh source code VB 6 untuk membuat aplikasi antrian. Aplikasi pembelian barang dengan visual basic, program kasir sederhana, source code.

More Information

There are two ways to control an Automation server: by using either late binding or early binding. With late binding, methods are not bound until run-time and the Automation server is declared as Object. With early binding, your application knows at design-time the exact type of object it will be communicating with, and can declare its objects as a specific type. This sample uses early binding, which is considered better in most cases because it affords greater performance and better type safety.

To early bind to an Automation server, you need to set a reference to that server's type library. In Visual Basic, this is done through the References dialog box found under the Project References menu. For this sample, you will need to add a reference to the type library for Excel before you can run the code. See the steps below on how to add the reference.

Building the Automation Sample

  1. Start Visual Basic and create a new Standard EXE project. Form1 is created by default.

  2. ClickProject and then click References. The Referencesdialog box appears. Scroll down the list until you find Microsoft Excel object library, and then select the item to add a reference to Excel. If the correct object library for your version of Excel does not appear in the list, make sure that you have your version of Excel properly installed.

    Notes

    • If you are automating Microsoft Office Excel 2007, the type library appears as Microsoft Excel 12.0 Object Library in the Referenceslist.
    • If you are automating Microsoft Office Excel 2003, the type library appears as Microsoft Excel 11.0 Object Library in the Referenceslist.
    • If you are automating Microsoft Excel 2002, the type library appears asMicrosoft Excel 10.0 Object Library in the References list
    • If you are automating Microsoft Excel 2000, the type library appears asMicrosoft Excel 9.0 Object Library in the References list.
    • If you are automating Microsoft Excel 97, the type library appears asMicrosoft Excel 8.0 Object Library in the References list
  3. Click OK to close the References dialog box.

  4. Add a CommandButton to Form1.

  5. In the code window for Form1, insert the following code:

    Savita bhabhi sex story pdf in hindi

  6. Press F5 to run the project.