J
Jon Vaughan
Im trying to make some code that can reference x amount of buttons and then
switch visible to false
For x = 1 To 10
btnSelected = CType("btnButton" & x.ToString, Button)
btnSelected.Visible = False
Next
Provides the error :
Value of type 'String' cannot be converted to 'System.Windows.Forms.Button'.
Any ideas, about converting string to object types such as buttons ?
switch visible to false
For x = 1 To 10
btnSelected = CType("btnButton" & x.ToString, Button)
btnSelected.Visible = False
Next
Provides the error :
Value of type 'String' cannot be converted to 'System.Windows.Forms.Button'.
Any ideas, about converting string to object types such as buttons ?