PRB: "Can't Assign To Read-Only Property" Error Message (178490)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q178490 SYMPTOMS
You receive the following error when you attempt to programmatically set a
control property:
Compile Error:
Can't assign to read-only property
CAUSE
You are attempting to programmatically change a read-only property of a
control at run-time.
RESOLUTION
If you need to change a read-only property at run-time, create another copy
of the control and set the read-only property at design-time. Then, display
the copy of the control THAT is appropriate to your task.
STATUS
This behavior is by design.
REFERENCES
"Can't make an assignment to a read-only property" topic in the Visual
Basic Online Reference
(c) Microsoft Corporation 1997. All Rights Reserved.
Contributions by Arsenio Locsin, Microsoft Corporation
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbprb KB178490 |
---|
|