Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Run_time-error 383 'Text Property Is Read Only'

I am getting the above error message when my Child form is loaded and I select one of the tabs in a TabStrip.
I know what the error means, but I'm not quite sure how to solve it.

cmbStartPage.Text = strStartPage

I am trying to add the string value (from registry) to the combobox.

At the moment the string value = ""
It works when the string is not empty.

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
'Text' Property Is Read-only
I renamed some of the files in my project so it would look more organized. I did it by using Save as and saving it to a new file name, and deleting the old one.

Now I'm getting "'Text' property is read-only" on textboxes when it didn't happen before. I looked in the properties, but I couldn't find anything that resembled it being read-only.

Any help?

Text Property Is Read Only
I have a stupid problem, I have a tabbed form with 3 access databases. 2 of the databases work fine and the third gives me an error when I try to add a record "text property is read only" I deleted the database and created a new one thinking I had made an error, but still no good!

I'm sure this is a simple fix, but I can't figure it out.


Text Property Is Read Only?
I keep getting the error message text property is read only, everytime i change my combo box from 0-combo box to 2-dropdown list. I only have one record in my main table and it has the correct option that is listed in the other table that the options are coming from. here is my code:
Private Sub LoadStatus()
    With rstblStatus
        Do Until .EOF
            cbostatus.AddItem !Status
            cbostatus.ItemData(cbostatus.NewIndex) = !id
    End With
End Sub
cbostatus is connected to a seperate table. SOes anyone know what might be causing this error? It works with the 0 option but I don't want the users to be able to type anything outside of the table in.

Text Property Is Read Only
Dim SourceCBO As Object
If rsfind.RecordCount > 0 Then
    SourceCBO.Text = rsfind.Fields(0).value
End If
Unload Me

after i run the application, it display ERROR 383 and the description is text property is read only
can anyone help me this?? it's urgent... thanks

ImageList: Error 384 Property Is Read Only
Hi all

I have a question about the ImageList Control. Is it possible to modifiy the images in that control.

I am making an usercontrol that works like an commandbutton and I want to store that images into a ImageList control and allow the user modifiy that images with Property GET and SET, but when I make something like this It says me that Error 383: The property is read-only

SET MyImageList.ListImages.Item(MyItem).Picture = m_picture


Run Time '383' Text Property Read Only
Please help!

I populate a combobox when a form is loaded. I use a "dropdown list" so that users can only select specific item. The record is saved. When the record is retrieved and loaded later on, i get:


I am selecting the item from the list using the following code:

If Not IsNull(form1_rs("MFG")) Then Form1.Combo2 = form1_rs("MFG")

Sometimes it works fine... other times I get the read only error. If the item is in the list, then i shouldnt get this error? right!?


ComboBox Text Property Is Read-only
Hi to everyone!

I need a little help in here. I put a combobox in a form, set its style to 2-Dropdown List. When i open the form and assign a string value to the combobox, an error occur and says it Text property is read-only. Can someone help me to have a workaround on this this?

cboEmploymentStatus.Text = adoPrimaryRS.Fields("EmpStatus")

Thanks for the reply!

Good Faq Here -Text Property Is Read Only-
I found question to some problem here :

Error When Read Active Directory: The Property Cannot Be Found In The Cache. Help!
I'm trying to get user details out of Active Directory but when it hits the line where i get the physical address
[ txtOffice.Text = userObject.Get("physicaDeliveryOfficeName") ]
it displays this error "The Directory Property cannot be found in a Cache" Can anyone tell me how to solve this. I'll be happy if you can give me a code too.


Run-time Error 383. 'Text' Property Is Readonly
Hello everybody!
I don't know why in an application I have this error 383. It says that the text property is readonly. It is just driving me crazy, I think this error happens in a richtextbox, but how can I avoid it? I am using Visual Basic 6 . This error didn't happen before, I am really surprised because it happens in every computer.
I would be very thankful for any answers

Country of eagles

Insertion Error {.Text Property Of Textbox Not Found}
I'm totally newbie to VB.
What's wrong with this code.
con.Execute ("INSERT INTO tbl_mark(M1) VALUES('" & text_tamil.Text & "')")
Error was
Method or data member not found


Cells Written To Text File Read Error 2029
I am using VB6 to open an Excel workbook that contains formulas. The tool opens the workbook and places user-specified information in certain columns.
There is also a column containg formulas. The formulas use the data from the user data columns.

The tool then writes out the values in the formula column to a text file.
If I run the tool once the text file (containing the column of formula values) reads Error 2029. However, if I were to open up the worksheet that the txt file was created from the formula coulmn displays the values properly.
Another strange thing is if I run the tool once more (without deleting the file I just created in the last run) the output txt file will be correct (values as displayed in worksheet).

Any ideas on this?? I seem to have been battling this one for a long time so help would really be appreciated.

User-friendly Text For Custom Property In Property Sheet
Anyone know how to give a custom property that return an enumeration type a user-friendly text when displayed in the property list?

If I define an enumeration:

Public Enum eCat
eBigBrownCat = 1
End Enum

And define a property:

Public Property Let CatType(newType As eCat)

Then VB will show "1 - eBigBrownCat" and "2 - eSmallBlackCat" in the droplist on the property list. How do I show "1 - Big Brown Cat" and "2 - Small Black Cat" instead? I know native VB properties like "BorderStyle" shows "1 - Fixed Single", etc. where the description can contain arbitrary text with spaces. When you call PropertyBag.WriteProperty(), VB's native properties also output like "BorderStyle = 1 'Fixed Single" into the module file, whereas my custom properties just get a number without the helpful comment.


Read-Only Property
Hi there,
I have the following code:

If wordwrap.Value = 1 Then
fMainForm.userdoc.ScrollBars = rtfVertical
End If
Wordwrap is a checkbox, I want it to set the scrollbars of the RTF box on the mainform to vertical only. This is so that it will wordwrap. However, it returns the following error:

This property is read-only

Whats going on???


Read Only Property
Hello, is it possible to by pass a read only property, i thought maybe using brutal force but that didnt work, any one got any ideas cheers!!

Thanks in advance

Read-Only Property In An OCX
How do I create a propperty in a OCX which is is not changeable by the user? Or should I create a function like "GetTotalConnections" instead of a property like "TotalConnections" because the user of that OCX won't be to change this? Which one is better?

Read Property In A GAL
i use this code to read a name of user of a GAL...
Is possible to read other peroperty fro a gal? For example:
office, department, email, id ecc...
(for my "Big friend" Geof i am Sal21, i heve posted with luca91 because have lost psw...)


    Dim INDIRIZZO As String
    Dim RIGA As String


    Dim NOM As Variant

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Set myGAddressList = myNameSpace.AddressLists("Elenco Indirizzi Globale")
    Set myGEntries = myGAddressList.AddressEntries
    RIGA = 2

    For Each LISTA In myGEntries

        If LISTA = "A.T.C.B. - Utenti" Then

            For Each NOM In LISTA.Members
                Sheets("UTENTI").Range("L" + RIGA) = Right(UCase(NOM.Address), 7)
                Sheets("UTENTI").Range("M" + RIGA) = UCase(NOM)
                'Sheets("TABELLA").Range("F" + RIGA) = UCase(NOM.FullName)
                RIGA = RIGA + 1
            Next NOM
            Exit For
        End If

    Next LISTA


End Sub

Edited by - luca91 on 1/23/2006 5:24:19 AM

Read Only Property

how can i set a file in run-time, to be read only when the user open it?


Read Only Property
Does anybody know how to write a read only property. I don't need code, just a verbal description. thank you for any help.

Archie Kantzavelos

Read-only Property Of TextBox
Hi Guys,
Please get me a way with read-only property of textbox.How can i make it read-write?

With Regards,

Multiline Read Only Property?
I'm building a my control, i have a textbox in it, so i have to make some property of the textbox to became property of the control:
' MultiLine -
Public Property Get MultiLine() As Boolean
MultiLine = mTEXTBOX.MultiLine
End Property
Public Property Let MultiLine(inVAL As Boolean)
mTEXTBOX.MultiLine = inVAL '****** ERROR ******
PropertyChanged "MultiLine"
End Property
the line i've marked with ****** ERROR ****** generate an error because Multiline is a read-only property....
why?.... and how can i change multiline property of my textbox?

How Can I Read From A Property Get In A Class?
Public Property Get WinVersion() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.WinVersion
WinVersion = mvarWinVersion
End Property

i have this public property in a class and i want from a form to read this i can do this?

Read-only Property Of TextBox
Hi Guys,
Please get me a way with read-only property of textbox.How can i make it read-write?

With Regards,

Cant Assign To Read-only Property
I am creating controls at run-time and I need to set a textbox's multiline to true, but when I try to do that, I get the following error message:


Compile error:
Can't assign to read-only property

This is the code, and the .MultiLine = True is highlighted... how can I set the text-box to multiline = True when the control(s) has/have been created?

Thanks in advance.

VB Code:
Public Sub CreateTextbox()    Dim tb(200) As TextBox     m_intContolNumber = Val(Abs(frmAmountOfControlsToAdd.txtNumber.Text))        For m_intIndex = 0 To m_intContolNumber        With frmMain            Set tb(m_intIndex) = .Controls.Add("VB.TextBox", "tb" & .Controls.Count)            Set tb(m_intIndex).Container = .picWorkArea        End With                With tb(m_intIndex)            .Visible = True            .Height = 500            .Width = 500            .MultiLine = True            .Left = 50            .Top = 50            .Text = vbNullString            .Appearance = 0        End With    Next m_intIndexEnd Sub

Can't Assign To Read Only Property
Why does VB say you can't assign a control property at runtime that it says in the help "Returns or Sets" the value? Just one example:

Command1.Appearance = 0

Says you can't do it. There are bunch of other properties like this that Help says the values are "Returned or Set" but that can't actually be set at runtime. Why can't these properties be set at run time. Why does Help say that it "sets" the vaule for a control when VB then says you can't do it?

Getting Read-only Property Of A File
I need to know if a file is set to read-only or not. How would I access this attribute? Thanks.

Can't Assign To Read Only Property
i'm getting an error : can't assign to read only property
this is the code:

dim rec as clsDB

Private Sub Command1_Click()
Set rec = New clsDB
rec.RecordSetField("privé-adres") = Me.Text1(0).Text
End Sub

End PropertyIn my class:

Public Property Get RecordSetField(field As String) As String

On Error GoTo errhandler

RecordSetField = rs.Fields(field)

Exit Property
If modFoutafhandeling.Foutafhandeling(Err) = False Then
Exit Property
Resume Next
End If

Read-only Property Of TextBox
Hi Guys,
Please get me a way with read-only property of textbox.How can i make it read-write?

With Regards,

Outlook And Setting Read Property

When I use Outlook 2000 or Outlook 2002 (?) Windows control, I can open an unread mail as forward, reply and so on....

But my problem is that I want outlook to register the mail as Read !

It is possible to set the property "Unread", but this has no effect ?

I can use MAPI-controls to do this, but than there is a popup-window asking for permission......

Thanks for any tips...

Switching The Read-only Property Of A File
I want to check the Read-only property of a selected file from a folder and switch it's property thru the code.
This is to make the vb program make the following actions:
1. Check the property of a file
2. If 'Read-only' is selected, un-select it. If it is not selected, select it.
How can this be done thru vb program?

Setting A File's Read Only Property?
How would I go about setting a file to be read only? The file already exists, I just want to change its properties.

Setting 'read-only' Property Of A File
Hello everybody!

Don't know if this has ever bugged you, but I shipped out some data files on a CD to a client in Canada. This wasn't a typical request, so I'd not included it in the scope of the project... anyway, they copied the files from the CD and proceeded to use them. Crash! The data files had maintained the read only status they had had on the CD.

So now I am forced to consider this problem, and here is my question; Is there an API which I can use to detect the read/write status of a file, and further remove the 'read only' flag?

Much regards,


Can't Assign To Read-only Property On My ScrollBars?
So I decided to make my first little notepad/html editor. I want to use menus of course such as "File, Edit, Format, etc.." and I figured out how to do that. Now I have set my menus I started working on them. Everything was going great until I got to Word Wrap. For those that do not know what Word Wrap is, its when you Toggle between a Vertical scrollbar or Both Vertical and Horizontal (look under Format in Notepad). So I made it checked because most of the time I will be using just Vertical which would be Checked. Now I still want to be able to toggle checked from unchecked which I figured out my first try. I know how to check and uncheck my menu item and all but I'm not too sure about making it work So just to sum it all up I want it like this:

If WordWrap is checked then scrollbars will be vertical only
If WordWrap is unchecked then scrollbars will be vertical and horizontal

I will want it to do that but when I use this:

Private Sub WordWrap_Click()
If WordWrap.Checked = True Then Text1.ScrollBars = 2
If WordWrap.Checked = False Then Text1.ScrollBars = 3
End Sub

Then I get the "Can't assign to read-only property" bull If anyone has an idea please tell me, im way too tired to play with this for another hour. Thank You ahead of time!

Read Only Property On A Textbox Difficulty???
The Property is Read Only and can't be set (Runtime Error 2135) on this line:

txtTotalHours.Text = Str(rs.Fields("SumOfHours"))

The value for Str(rs.Fields("SumOfHours")) works fine, it's setting the textbox txtTotalHours.Text that proposes the problem. I've also tried referring to .Value and not doing the Str - same result.

Any help would be greatly appreciated.


Private Sub UpdateHours()
Dim sql As String
sql = "SELECT Sum(tblHours.Hours) AS SumOfHours " & _
"FROM tblHours " & _
"GROUP BY tblHours.XDate " & _
"HAVING (((tblHours.XDate)= #" & cboXDate.Value & "#)); "

Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

rs.Open sql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Do While Not rs.BOF Or rs.EOF
[color=Red] txtTotalHours.Text = Str(rs.Fields("SumOfHours"))[/color]


Set rs = Nothing

End Sub

Changing A File Property So Its NOT Read Only
heya guys

if i copy a file off a cd using code it leaves the file as read only. how can i change it from read only to normal file status?

thank you in advanced


Combobox Style Property Is Read-only.
I found this interesting. When I changed the combobox style to 2- dropdown list the text property becomes read only,so I cant set or change it at runtime.

For Each ctrl In frmX.Controls
If TypeOf ctrl Is ComboBox Or TypeOf ctrl Is TextBox then
ctrl.Text = ""
end if

so how am I suppose to clear all the comboboxes? I'd rather leave it as a dropdown list if I can.

Why Is Combobox Height Property Read Only??
In vb6, I am using comboboxes and I can't alter the height. Selecting help on the read-only prompt says that it is read only in design and run time. So I have one combobox with the height of 360 for some reason and the others are at 315. Is there a way around this so I can adjust the height?

Remove Read-Only Property Of File
Hello Gurus,

My computer was infected by virus, what the virus did was added this string "<html><script language="JavaScript">"readme.eml", null, "resizable=no,top=6000,left=6000")</script></html>" to some of my ASP, HTM, EXE, and DLL files.
What I did, I opened each file then detect the presence of that string, if found I've deleted it by this code:
fnum = FreeFile
Open file_name For Output Access Write As fnum
Print #fnum, file_text;
Close #fnum

I was succesful with some files, but for files with Read-only Attributes this code won't work, WHY?
Please help.
Thanks in advance

ActiveX Read/Write Property Value Woes.
Hi, I'm working on my first ActiveX control, and can't seem to get the read write properties working correctly. Here are the read/write methods.

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

txtNotes.Visible = PropBag.ReadProperty("ShowNotes", True)
txtLyrics.Visible = PropBag.ReadProperty("ShowLyrics", True)

Debug.Print "Lyrics status read " & ShowLyrics

End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

Call PropBag.WriteProperty("ShowNotes", txtNotes.Visible, False)
Call PropBag.WriteProperty("ShowLyrics", txtLyrics.Visible, False)

Debug.Print "Lyrics status written " & ShowLyrics

End Sub

when i first run the application however the debug screen shows as follows

Lyrics status written True
Lyrics status read False

Am I doing this all wrong or what, surely the read value should match the written value... any clues?

Changing The Read Only Property BorderStyle During Runtime
After 8 years experience in VB, I still don't know how to change the Borderstyle property of a Form during runtime, which is a read only property that can only be changed during design time. I can do it using Win32 to create my own window, which in return allows me to have full control over the window and all, but there's gotta be a way to do it on a regular form. API's might be the solution.

The reason I need it is because I'm making a OpenGL tutorial with a hybrid initialization of both Fullscreen and Windowed mode, which you can choose simply by a boolean variable to go to either or. Only thing is though is that the border is there during fullscreen mode. I solved it using DirectX8 to switch to fullscreen mode, then using OpenGL for rendering, which eliminated the border for me, but I would like to avoid using DirectX to solve that problem so I can use strictly OpenGL. Does anyone know how to change the Borderstyle of a form during runtime?

How To Grayed 'Read Only' In Property Of Explorer Of Windows With VB?
I'd like to be able to desabled the 'Read only' (and grayed this case)
with vb codes. How to do this to protect a file againts deleting?

How Define Read Only Property When Creat Objet ?
When you create an object ComboBox with Controls.add :
   Dim OBJ As ComboBox

   Set OBJ = Form.Controls.Add("Vb.ComboBox", "MyCombo")

You can't change Obj.Style (read only) to get VbComboSimple !!!

How declare the style before or during create object ?

I would be grateful if anyone can help me with this...

ComboBox Not Working Properly...need To Remove Read-only Property
I have a ComboBox that has the Style set to 2-Dropdown List and I'm very angry with it right now. Cause even tho I can type in a character that would match something on the list, like an a - and the word apple would appear, or b - and the word bear would appear (of course if they were in my list)...I cannot have my ComboBox make it equal to nothing because the property on it is Read-only!

So let's say I start a new order and I have all my text boxes erased with the data...I can't make my
combo box cmbList.Text = ""
Any help is appreciated!



Howto Read Property Of Webbrowsercontrol In Foreign Program?
Hi Forum,

I want to read out the property LocationURL of an webbrowser-control in an other application. I have the window handle of the control, can anyone tell me if this is possible and how to do it?


EASY: How To Read The Picture Property To Get The Path Of The Image?
I have an Image control and have assigned a path (ie: g:mypicsphoto1.jpg) to the Picture property of the Image control.

Is there a way to obtain the "g:mypicsphoto1.jpg" full file path name from reading the Image control?

I believe I tried "path = Image1.picture" but it resulted in some large number instead of a text string indicating the assigned file path name.

Cnnot Read OutOfOffice Session Property In Outlook
I'm writing an Outlook Add-In where I'll need to check if the OutOfOffice switch is active into the actual Outlook session (Outlook 2000 SR-1 on W2K).

If I try this code (it's a sort of resumee. I log into Outlook by a InitHandler in my app):

   Dim gobjCDO As MAPI.Session
   Set gobjCDO = CreateObject("MAPI.Session")
   gobjCDO.Logon "", "", False, False

   If gobjCDO.OutOfOffice = True Then MsgBox "I'm Out of office!"

It cames with this error:

Run-Time Error -2147467262
[Collaboration Data Objects - E_NOINTERFACE(80004002)]

It has to work in mixed Exchange(5.5 SP3) / Internet E-Mail outlook profiles (2). I don't want to logon with profile name, servername because the add-in initializes within Outlook and I don't want the user autenticate another time giving servers, profiles or similar.

I tried to read somehow the PR_OOF_STATE from the Extended MAPI but there is a litte Problem: I can't program C++ , and I don't want to start with it now.


Does someone know this problem and knows how to solve it within VB? Does someone know how to read the extended MAPI Property PR_OOF_STATE with VB? Does somone know it there is a component to access this from VB? Where do Outlook stores the OutOfOffice status when it's not connected to Exchange?(Registry??)
(PS: Redemption won't do it. Cannot access this MAPI property)

Alignment In A Textbox In ActiveX Control (Can't Assign To A Read Only Property)
I am new at developing activex controls. I am busy
developing a text control which allows one to set it to
only accept decimal or non-decimal numbers or letters
only and/or set the case.
I don't seem to get the alignment property to work. It
appears in a get statement, but has no let. If I try to
set it in the activex code, i.e. txtText.alignment = 1
it tells me that is a read only property.
I saw Shandy's post re this i.e.
"How to make Alignment available to User in ActiveX"
She suggested:

Public Property Let Alignment(ByVal nNewAlignment As AlignmentConstants)
    nAlignment = nNewAlignment
    text1.alignment = nAlignment <----------------------- Code Added Here
    PropertyChanged "Alignment"
End Property

But I still get "Can't assign to a read only property" at the ' <-------------Code added Here

Can anybody please explain, or help?
Thanks, Hans

Create Package Error; &"Unexpected Error Number 380 Has Occured;invalid Property Value
Hi all,

I try to create a package in visual basic; However, I found the following error. "Unexpected error number380 has occured; Invalid property value". My development environment ,
OS: Win2000
VB: Visual Basic 6.0

Thanks a lot .

Edward Hui

Set The Text Vaule Of The Text Property Of An Object On The Page
folks inside of excel (xp2000 ms excel 2003) i go to a webpage :
WebBrowser1.Navigate ("")
WebBrowser1.FullScreen = True
I now need to get (and set) the text vaule of the text property of an object on the page with the html name = 'login name".
is there a way to do this and can someone show me how. This is vb inside of excel.
Thanks in advance

Copyright © 2005-08, All rights reserved