+ Reply to Thread
Results 1 to 10 of 10

run time error 380 could not set the rowsource property. invalid property value

Hybrid View

zoriqah run time error 380 could not... 05-10-2023, 01:31 AM
Andy Pope Re: run time error 380 could... 05-10-2023, 02:20 AM
zoriqah Re: run time error 380 could... 05-10-2023, 03:05 AM
Andy Pope Re: run time error 380 could... 05-10-2023, 03:18 AM
zoriqah Re: run time error 380 could... 05-10-2023, 08:35 PM
Andy Pope Re: run time error 380 could... 05-11-2023, 02:24 AM
zoriqah Re: run time error 380 could... 05-16-2023, 09:49 PM
zoriqah Re: run time error 380 could... 05-21-2023, 09:17 PM
Andy Pope Re: run time error 380 could... 05-22-2023, 02:34 AM
zoriqah Re: run time error 380 could... 05-24-2023, 10:44 PM
  1. #1
    Registered User
    Join Date
    05-09-2023
    Location
    kuala lumpur, malaysia
    MS-Off Ver
    microsoft 365
    Posts
    13

    run time error 380 could not set the rowsource property. invalid property value

    Hi .

    I have problems with this error.
    I have debug the code and no error shown but when I tried to run the code it shows this error.

    Attachment 828681


    and error shows highlighted line

    error.png

    My code will be these:

    Sub Reset()

    Dim iRow As Long

    iRow = [Counta(Database!A:A) ]

    With UserForm2


    .TextBox1.Value = ""
    .TextBox5.Value = ""
    .TextBox4.Value = ""
    .TextBox3.Value = ""
    .TextBox2.Value = ""
    .TextBox7.Value = ""
    .TextBox6.Value = ""
    .TextBox8.Value = ""
    .TextBox9.Value = ""

    .ListBox1.ColumnCount = 9
    .ListBox1.ColumnHeads = True


    If iRow > 1 Then

    .ListBox1.RowSource = "Database A2:J" & iRow

    Else

    .ListBox1.RowSource = "Database A2:J2"

    End If

    End With


    End Sub

    Sub Submit()

    Dim sh As Worksheet
    Dim iRow As Long

    Set sh = ThisWorkbook.Sheets("Databse")

    iRow = [Counta(Database!A:A)] + 1

    With sh

    .Cells(iRow, 1) = iRow - 1

    .Cells(iRow, 2) = UserForm2.TextBox1.Value

    .Cells(iRow, 3) = UserForm2.TextBox5.Value

    .Cells(iRow, 4) = UserForm2.TextBox4.Value

    .Cells(iRow, 5) = UserForm2.TextBox3.Value

    .Cells(iRow, 6) = UserForm2.TextBox2.Value

    .Cells(iRow, 7) = UserForm2.TextBox7.Value

    .Cells(iRow, 8) = UserForm2.TextBox6.Value

    .Cells(iRow, 9) = UserForm2.TextBox8.Value

    .Cells(iRow, 10) = UserForm2.TextBox9.Value


    End With

    End Sub








    thank you for your helps

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: run time error 380 could not set the rowsource property. invalid property value

    Try adding the ! separator to your sheet range reference

    .ListBox1.RowSource = "Database!A2:J" & iRow
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    05-09-2023
    Location
    kuala lumpur, malaysia
    MS-Off Ver
    microsoft 365
    Posts
    13

    Re: run time error 380 could not set the rowsource property. invalid property value

    Hi Andy

    Thank you for the response.

    I have tried your suggestion and no error on that.

    The highlighted error was shown again in line below

    Attachment 828691

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: run time error 380 could not set the rowsource property. invalid property value

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.



    Your attachments are reporting as not valid. Use instructions at top of page to upload example file.

  5. #5
    Registered User
    Join Date
    05-09-2023
    Location
    kuala lumpur, malaysia
    MS-Off Ver
    microsoft 365
    Posts
    13

    Re: run time error 380 could not set the rowsource property. invalid property value

    Quote Originally Posted by Andy Pope View Post
    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.



    Your attachments are reporting as not valid. Use instructions at top of page to upload example file.







    Hi Andy, here is my workbook


    IRPave VBA3.xlsm

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: run time error 380 could not set the rowsource property. invalid property value

    two changes.

    Module1, sub routine Reset.
    Remove of spaces in sheet!range reference
            .ListBox1.RowSource = "Database!A2:J" & iRow
            
            Else
            
            .ListBox1.RowSource = "Database!A2:J2"
            
            End If
    and in Userform9
    Private Sub CommandButton1_Click()
    
    ' order flipped to stop error of showing modeless form from a model one
    Unload UserForm9
    UserForm2.Show
    
    End Sub

  7. #7
    Registered User
    Join Date
    05-09-2023
    Location
    kuala lumpur, malaysia
    MS-Off Ver
    microsoft 365
    Posts
    13

    Re: run time error 380 could not set the rowsource property. invalid property value

    Quote Originally Posted by Andy Pope View Post
    two changes.

    Module1, sub routine Reset.
    Remove of spaces in sheet!range reference
            .ListBox1.RowSource = "Database!A2:J" & iRow
            
            Else
            
            .ListBox1.RowSource = "Database!A2:J2"
            
            End If
    and in Userform9
    Private Sub CommandButton1_Click()
    
    ' order flipped to stop error of showing modeless form from a model one
    Unload UserForm9
    UserForm2.Show
    
    End Sub


    Dear Andy,

    Thank you so much for your help. It is working now.

  8. #8
    Registered User
    Join Date
    05-09-2023
    Location
    kuala lumpur, malaysia
    MS-Off Ver
    microsoft 365
    Posts
    13

    Re: run time error 380 could not set the rowsource property. invalid property value

    Quote Originally Posted by Andy Pope View Post
    two changes.

    Module1, sub routine Reset.
    Remove of spaces in sheet!range reference
            .ListBox1.RowSource = "Database!A2:J" & iRow
            
            Else
            
            .ListBox1.RowSource = "Database!A2:J2"
            
            End If
    and in Userform9
    Private Sub CommandButton1_Click()
    
    ' order flipped to stop error of showing modeless form from a model one
    Unload UserForm9
    UserForm2.Show
    
    End Sub



    Hi Andy,

    Can I contact you personally?
    I just really need your help with my coding. Its other coding.

    Can you give me your email for me to contact?

    Really appreciate your help.
    Thank you.

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: run time error 380 could not set the rowsource property. invalid property value

    No the forum does not work like that.

    If you need help with a project consider the paid for services offered via the Commerical Services part of the site

  10. #10
    Registered User
    Join Date
    05-09-2023
    Location
    kuala lumpur, malaysia
    MS-Off Ver
    microsoft 365
    Posts
    13

    Re: run time error 380 could not set the rowsource property. invalid property value

    Quote Originally Posted by Andy Pope View Post
    No the forum does not work like that.

    If you need help with a project consider the paid for services offered via the Commerical Services part of the site


    I see ok noted. Thank you.

    So we will discuss here.

    Below is my new coding.

    But I don't know where are the errors. I cannot find it.
    Please help me.

    IRPAVE NEW DESIGN 3.xlsm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Could not set the RowSource property,invalid property value
    By simiyus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2023, 09:56 AM
  2. Could not set the RowSource property. Invalid Property Value error when switching bet
    By sathyaganapathi in forum Access Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2021, 06:54 AM
  3. Replies: 5
    Last Post: 06-02-2020, 04:56 PM
  4. Runtime error 381: Could not set the list property.Invalid property array index
    By rohith4prithvi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2014, 10:24 PM
  5. Run-time Error '380': Could not set the RowSource property. Invalid property value
    By Rem0ram in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2013, 03:57 PM
  6. [SOLVED] Excel run-time error '381': Could not set the List property. Invalid property array index
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-20-2012, 12:48 PM
  7. Replies: 2
    Last Post: 06-11-2012, 03:03 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1