CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Posts
    160

    Which is wrong about array set

    Hello;
    I first use VB++.
    My code like this :
    Dim sObject(1 To 3) As CheckBox
    sObject(1) = Sheet2.CheckGAI10
    sObject(2) = Sheet2.CheckGAI11
    sObject(3) = Sheet2.CheckGAI12
    But debug is error.
    How to do?
    Welcome any advices.
    Thank you very much.



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

    Re: Which is wrong about array set

    I assume matter is not in Sheet2.CheckGAI10 (you can access those objects, can you?). If this is correct, then try...

    set sObject(1) = Sheet2.CheckGAI10

    do not forget before unloading to write
    set sObject(1) = nothing

    Hope it solve your matter.

    Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
    ...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
  •  





Click Here to Expand Forum to Full Width

Featured