bdautrich
New Member
- Joined
- Sep 22, 2022
- Messages
- 19
- Office Version
- 2013
- Platform
- Windows
Working on Excel VBA app. And I am getting an error I can not figure out.
The app is displaying a range from a spreadsheet in a list box on a user form, The first time it does this, things work fine. The user form has some text input boxes that allows the user to input a new row of data unto the spreadsheet. After the user clicks on the save button the VBA code calls the subroutine to reset the list box and the second time through, I get the 380 error. I put in a msgBox to see that the only parameter which is the row number of the last row is valid and it is so I do not have an idea what is happening. The strange this I have nearly identical VBD code that works the same way with a different spreadsheet, and I am not experiencing the error there.
Here is the code that
MsgBox ("In reset and iRow = " & iRow)
If iRow > 1 Then
.lstJoints.RowSource = "List1!A2:I" & iRow ' this is the line that generates the error
Else
.lstJoints.RowSource = "List1!A1:I1"
End If
Any help would greatly be appreciated.
The app is displaying a range from a spreadsheet in a list box on a user form, The first time it does this, things work fine. The user form has some text input boxes that allows the user to input a new row of data unto the spreadsheet. After the user clicks on the save button the VBA code calls the subroutine to reset the list box and the second time through, I get the 380 error. I put in a msgBox to see that the only parameter which is the row number of the last row is valid and it is so I do not have an idea what is happening. The strange this I have nearly identical VBD code that works the same way with a different spreadsheet, and I am not experiencing the error there.
Here is the code that
MsgBox ("In reset and iRow = " & iRow)
If iRow > 1 Then
.lstJoints.RowSource = "List1!A2:I" & iRow ' this is the line that generates the error
Else
.lstJoints.RowSource = "List1!A1:I1"
End If
Any help would greatly be appreciated.