|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Commandbutton Graphical Error
Hi,
I got this code that set all my command button to the desired picture I want but I can't get it. The error message: Can't assign to read-only property <code> Private sub Form_Load() on error resume next '----if I didnt set this a type mismatch error is generatd on the For Each statement why?Dim x As CommandButton For Each x In Form1.Controls x.Picture = LoadPicture(App.Path & "\Picture\arrow.gif") x.Style = 1 '<----Graphical is set to 1 but this causes the error, (I can set this at design time without flaws but at runtime grrr!) Next end sub </code> |
|
#2
|
|||
|
|||
|
" x.Style = 1 '<----Graphical is set to 1 but this causes the error, (I can set this at design time without flaws but at runtime grrr!)"
Maybe I am too sily but... if you can't do it on runtime why not do it in design time and leave the buttons that way. ![]() |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Commandbutton Graphical Error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|