Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modify an object.
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00362257
Message ID:
00362375
Vues:
21
>>I have a number of grids that I desire to visualy modify via a function. And I get the type mismatch error when using the code below. I know I am overlooking something simple. I appreciate everyones help.
>>
>>
>>Private Sub CmdTestGreenBar_Click()
>>    GreenBar (frmMain.grdBudgetSummary)
>>End Sub
>>'====================
>>Public Function GreenBar(objGrid As Object)
>>    Dim x As Long
>>    objGrid.Row = 0
>>    objGrid.Col = 0
>>
>>    Do Until objGrid.Row = objGrid.Rows - 1
>>        objGrid.Row = objGrid.Row + 1
>>
>>        For x = 0 To objGrid.Cols - 1
>>            objGrid.Col = x
>>            objGrid.CellBackColor = &HC0FFC0 'Light green
>>        Next
>>        objGrid.Row = objGrid.Row + 1
>>    Loop
>>' DEV: fix for odd number of rows
>>End Function
>
>
>Which grid control are you using?
>
>Try a simple thing, don't put parentheses around the the paramater:
>
GreenBar frmMain.grdBudgetSummary
YIPPEE!! I took it out of parentheses and it worked as desired! MSFlexGrid is the one I'm using.

Thanks Eric! You ROCK!!

Now I need to look up sorting this grid on the fly. Any suggestions?
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform