VBA Property Type

I know that this is ultrabasic in VBA, but I was looking for 6 books (VBA for dummies 2010, Excel Bible, Proffesional Excel Development: definitive guide, VBA and Macros Excel Microsoft 2010, programming in Excel with VBA, Microsoft Excel VBA Proffesional Projects), and no one grants rights to 3 types of read-only properties, only write and read / write.


They probably think that this is a basic way to even mention in their books, but hey, if you thought me that computers were electricity purification filters 11 months ago and you know that you want code, now someone has to say pure explanation to you

thanks for watching my question

+3
source share
1 answer

As the names show,


- , , . , .Text

Msgbox Range("A1").Text

,

ActiveSheet.Range("A1").Text = "Blah Blah"

Runtime Error 1004 - Unable to set the Text property of the Range Class


. - , Property Let or Set, Get Method.

Private MyName As String

Property Let sName(Value As String)
    MyName = Value
End Property

/ . . , .Value Read/Write

Range("A1").Value = "Blah Blah"

: Courtesy @Mehow

F2 Visual Basic, Object Browser. - , , , /.

+9

All Articles