ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Object defined errror (https://www.excelbanter.com/excel-discussion-misc-queries/149799-object-defined-errror.html)

N.F[_2_]

Object defined errror
 
Help please

I have the following code, and when I step through it using F8 key it
highlights the third line as an error. Any ideas?????????

Private Sub SelectArguments_Click()
EngIndex = EngineSelect.List(EngineSelect.ListIndex, -1)
Set inputrange = Range("Parameter_List")
Set Inrng = Range(inputrange(1, EngIndex + 1),
inputrange(inputrange.Rows.Count, EngIndex + 1))
For Each Cell In Inrng
If IsEmpty(Cell.Value) Then
Exit For
Else
UserForm1.ListBox2.AddItem (Cell.Value)
End If
Next
UserForm1.Show
End Sub

Dave Peterson

Object defined errror
 
Maybe you don't have a range named Parameter_List on the worksheet.



N.F wrote:

Help please

I have the following code, and when I step through it using F8 key it
highlights the third line as an error. Any ideas?????????

Private Sub SelectArguments_Click()
EngIndex = EngineSelect.List(EngineSelect.ListIndex, -1)
Set inputrange = Range("Parameter_List")
Set Inrng = Range(inputrange(1, EngIndex + 1),
inputrange(inputrange.Rows.Count, EngIndex + 1))
For Each Cell In Inrng
If IsEmpty(Cell.Value) Then
Exit For
Else
UserForm1.ListBox2.AddItem (Cell.Value)
End If
Next
UserForm1.Show
End Sub


--

Dave Peterson


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com