dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Help with CreateObject

  1. #1
    Join Date
    Jul 2002
    Posts
    38

    Unhappy Help with CreateObject

    I am trying to use the CreateObject function to create a DAO data control object instead of putting it on the form coz it clutters up my form and I don't like it.

    However, I couldn't work out how to create one via the use of code. Can someone please help?

    Thanks.

    Woobi.

  2. #2
    Join Date
    Sep 2001
    Location
    IL, USA
    Posts
    1,090
    'The Code below should get you started.
    Code:
    Private WithEvents DataCtrl As Data
    Private Sub Form_Load()
       Set DataCtrl = Me.Controls.Add("vb.data", "Data1")
       With DataCtrl
          .Visible = True
          .Width = 1500
          .Height = 400
          'Add more properties here
       End With
    End Sub

  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Lightbulb 5 stars

    Have a nice day, MKSa
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)