MSFlexGrid control and testing emptiness in an object (2 questions) 
Author Message
 MSFlexGrid control and testing emptiness in an object (2 questions)

1)  I'm a beginner with VB 6 and I can populate an Flexgrid control but I
would like to have the columns expand so it shows all of the information.
How may I do this?

2)  Also, I am using ADSI to get a list of groups and what members are
there.  I would like to be able to test whether the object has members.
Here is an example of what I have so far:

     For Each oGroup In oContainer
      If oGroup.Members = "" Then
       p = p + 1
       mfgReport.Rows = mfgReport.Rows + 1
       mfgReport.TextArray(fgi(p, 1)) = oGroup.Name
       mfgReport.TextArray(fgi(p, 2)) = oGroup.Description
      End If
      If (UCase(oGroup.Name) = UCase("domain users")) And (Check1(3).Value =
1) Then
      Else
      For Each oMember In oGroup.Members
       p = p + 1
       mfgReport.Rows = mfgReport.Rows + 1
       mfgReport.TextArray(fgi(p, 1)) = oGroup.Name
       mfgReport.TextArray(fgi(p, 2)) = oGroup.Description
       mfgReport.TextArray(fgi(p, 3)) = oMember.Name
      Next
      End If
     Next

The second line "If oGroup.Members = "" then" is where I'm trying to put the
test of emptiness.  Anyone have any idea?  Is what I'm looking for clear
enough?

Jeff Pitsch



Mon, 22 Jul 2002 03:00:00 GMT  
 MSFlexGrid control and testing emptiness in an object (2 questions)
Hi

Check the keywords 'Nothing' and 'TypeOf'
eg

'Check if an object variable is initialized
If myObject Is Nothing then
If Not myObject Is Nothing then

' Check if object implements the IADsContainer Interface
If TypeOf Object Is IADsContainer Then

bye




Mon, 22 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. The Emptiness of the ValidationRule Property on QueryDef Objects

2. TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST

3. "testing" a recordset object (newbie question)

4. Testing for existence of a control /Object

5. Question about editing recordset using MSFlexGrid bound to a Data control

6. MSFlexGrid Control - Sorting Question

7. A little question about MSFlexGrid control

8. MSFlexGrid Control Question

9. MSFlexGrid Control Question

10. Question about Msflexgrid and DBgrid control

11. Question about MSflexgrid and DBgrid control....

12. VB5's MSFlexGrid Control Question

 

 
Powered by phpBB® Forum Software