Evaluate?

HPOnline
09-06-2003, 03:31 AM
How do I convert the Evaluate function in VBA to VB6?

In VBA, Evaluate could evaluate object names eg.

Evaluate(CommandButton + buttonNumber).BackColor = &HFF&

In VB6, there seems to be no function for doing this.

vbfan
09-06-2003, 03:39 AM
Hmm, I hope that I understand you right.
This should do it:

Private Sub ChangeColor(ButtonNr As Integer)
COMMANDBUTTONARRAY(buttonNr).BackColor = &HFF&
'Replace the COMMANDBUTTONARRAY with the name of your ButtonArray
End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum