Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Feb 2006
    Location
    Washington, District Of Columbia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error 380 Could not set the value property Macro (Word 2003)

    Hi,

    I'm hoping that someone can help me. I have a macro that I created and in the initial form that displays I have a button to manage authors which calls another form. However, I get an Error 380 Could not set the value property. Invalid Property Value. When I click on debug it takes me to the following sub:

    Private Sub cmdModifyAuthor_Click()
    frmManageAuthors.Show
    End Sub

    What can be causing this... any ideas?
    I have another macro with the sam sub and it seems to work without issues... I tried comparing the code but nothing really jumped out at me.

    Thanks in advance for any suggestions or ideas you may have.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    This means that something goes wrong when the code tries to load frmManageAuthors. Do you have a Form_Initialize event procedure for frmManageAuthors? If so, try setting a breakpoint at its first line (click in the Private Sub Form_Initialize() line and press F9). When you click the cmdModifyAuthor button, the code should pause here. You can single-step through it by pressing F8. This should give you an idea where the error occurs.

  3. #3
    Lounger
    Join Date
    Feb 2006
    Location
    Washington, District Of Columbia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    Thanks Hans [img]/forums/images/smilies/smile.gif[/img]

    I'm going to check it out right now... I'll let you know how it goes.

    Thanks Again!!!

  4. #4
    Lounger
    Join Date
    Feb 2006
    Location
    Washington, District Of Columbia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    Hi Hans,

    I tried that but it didn't seem to work. I'm really not a programmer so I can be doing something wrong. As soon as I click the Manage Authors button I get the error.

    Thanks,

    Cris

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Error 380 Could not set the value property Mac

    You could try the Stop statement:

    <code>Sub Userform_Initialize()
    Stop ' continue by clicking the single-step button on the Debug toolbar
    ' the rest of your existing code starts here</code>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    If Jefferson's suggestion doesn't work either, could you attach a sanitized and zipped version of your template or document?

  7. #7
    Lounger
    Join Date
    Feb 2006
    Location
    Washington, District Of Columbia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    Well, I figured out that the .dot file kind of works if I have the authors.ini file and defaults.ini file created within the wdUserTemplatesPath) & "authors.ini

    I figured it out because when I got home it worked just fine and than when I deleted them it no longer worked. The other macro that I have actually just goes ahead and creates the file but this one does not. I just get the error 380. Now I have to figure out a way to create the file if it does not exist.

    Thanks for your quick response and sharing your guru knowledge [img]/forums/images/smilies/smile.gif[/img]

  8. #8
    Lounger
    Join Date
    Feb 2006
    Location
    Washington, District Of Columbia
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    Here goes the template [img]/forums/images/smilies/smile.gif[/img]
    Attached Files Attached Files

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error 380 Could not set the value property Macro (Word 2003)

    You can test whether a file exists using the Dir function, and if not, write default values to it using PrivateProfileString - this will create the file for you.

    Example:
    <code>
    AuthorsFile = Options.DefaultFilePath(Path:=wdUserTemplatesPath) & "authors.ini"
    If Dir(AuthorsFile) = "" Then
    System.PrivateProfileString(AuthorsFile, "Author", "1") = "Hawthorne, Nathaniel"
    ...
    End If
    </code>
    If the .ini files exist, the dialogs open without error, as you found out. I cannot judge whether they do what you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •