Results 1 to 1 of 1

Thread: Class Objects Created Using the CreateObject Method That Employs Late Binding

  1. #1
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10

    Class Objects Created Using the CreateObject Method That Employs Late Binding

    It is often necessary to use Late Binding in your code when you do not know which version of the application your end user would be using. For example, you would have written your code in Excel to send a mail from Outlook, and added a reference to Outlook 12.0 Object Library which corresponds to Outlook 2007, and your end user would be using Outlook 2003. Your code would then throw an error because it cannot find the library that you have referenced. To take care of such issues, a developer creates the object during run-time, and the method is termed in programming the world as 'Late Binding'.

    I have seen many people enquire how to create these so called objects in VBA. Well, one does this by using the 'CreateObject' method. A list of most commonly used strings (text) to create objects of the kind are given below.

    Application Objects>>
    CreateObject("Excel.Application")
    CreateObject("Word.Application")
    CreateObject("Photoshop.Application")
    CreateObject("Outlook.Application")
    CreateObject("Access.Application")
    CreateObject("FrontPage.Application")
    CreateObject("InternetExplorer.Application")
    CreateObject("PowerPoint.Application")
    CreateObject("Shell.Application")

    ADO Database Objects>>
    CreateObject("ADODB.Connection")
    CreateObject("ADODB.Recordset")
    CreateObject("ADODB.Command")
    CreateObject("ADODB.Stream")

    Scripting Objects>>
    CreateObject("Scripting.FilesystemObject")
    CreateObject("Scripting.Dictionary")
    CreateObject("MSScriptControl.ScriptControl")
    CreateObject("WScript.Shell")
    CreateObject("WScript.Network")
    CreateObject("Shell.UIHelper")
    CreateObject("VBScript.Regexp")

    Email Objects>>
    CreateObject("Outlook.Application")
    CreateObject("MAPI.Session")
    CreateObject("MSMAPI.MAPISession")
    CreateObject("MSMAPI.MAPIMessages")

    Form Objects>>
    CreateObject("MSComDlg.CommonDialog")
    CreateObject("ShockwaveFlash.ShockwaveFlash")




    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNsaS3Lp1
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgR1EPUkhw
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNe_XC-jK
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNPOdiDuv
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgN7AC7wAc
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm9wlhQrYJP 3M
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg
    https://www.youtube.com/watch?v=DVFFApHzYVk&lc=Ugyi578yhj9zShmhuPl4AaABAg
    https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgxvxlnuTRWiV6MUZB14AaABAg
    https://www.youtube.com/watch?v=_8i1fVEi5WY&lc=Ugz0ptwE5J-2CpX4Lzh4AaABAg
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxoHAw8RwR7VmyVBUt4AaABAg.9C-br0lEl8V9xI0_6pCaR9
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=Ugz5DDCMqmHLeEjUU8t4AaABAg.9bl7m03Onql9xI-ar3Z0ME
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxYnpd9leriPmc8rPd4AaABAg.9gdrYDocLIm9xI-2ZpVF-q
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgyjoPLjNeIAOMVH_u94AaABAg.9id_Q3FO8Lp9xHyeYSuv 1I
    https://www.reddit.com/r/windowsxp/comments/pexq9q/comment/k81ybvj/?utm_source=reddit&utm_medium=web2x&context=3
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm9wlhQrYJP 3M
    ttps://www.youtube.com/watch?v=LP9fz2DCMBE
    https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg
    https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg.9wdo_rWgxSH9wdpcYqrv p8
    ttps://www.youtube.com/watch?v=bFxnXH4-L1A
    https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxuODisjo6cvom7O-B4AaABAg.9w_AeS3JiK09wdi2XviwLG
    https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxBU39bTptFznDC1PJ4AaABAg
    ttps://www.youtube.com/watch?v=GqzeFYWjTxI
    https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgwJnJDJ5JT8hFvibt14AaABAg
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 11-30-2023 at 02:33 PM.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Manipulate VBA Array Object Using Class Module
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 0
    Last Post: 06-06-2013, 07:53 PM
  2. Array Class Module
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 3
    Last Post: 12-20-2012, 11:22 AM
  3. WorksheetFunction.MInverse Method
    By Rasm in forum Excel Help
    Replies: 1
    Last Post: 12-06-2011, 07:55 AM
  4. Worksheet Protection Method with UserInterfaceOnly Argument
    By technicalupload in forum Download Center
    Replies: 1
    Last Post: 09-02-2011, 04:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •