I keep getting this error on opening the Excel app. Sometimes the error generates and sometimes it doesn't.
The difficult part for me is figuring out why Excel doesn't like this line of code. As I see it, the code is not violating
any rules. Images with code below. The only other thing I can say is that this Listbox1 is on a Sheet, not a userform.
But that shouldn't make any difference, should it ?
With the code above and images below, can anyone "see" what's causing the error in the code excel doesn't like.
Thanks for anyone's help. cr
The difficult part for me is figuring out why Excel doesn't like this line of code. As I see it, the code is not violating
any rules. Images with code below. The only other thing I can say is that this Listbox1 is on a Sheet, not a userform.
But that shouldn't make any difference, should it ?
Code:
Private Sub ListBox1_Click()
Dim n As Long
n = ListBox1.ListIndex
Sheets("BIBLETEXT").TextBox3.Value = ListBox1.List(n, 1) _ ----->'yellow highlight error starts at this inis line
& vbCrLf _
& vbCrLf _
& ListBox1.List(n + 1, 1) _
& vbCrLf _
& vbCrLf + ListBox1.List(n + 2, 1) _
& vbCrLf _
& vbCrLf + ListBox1.List(n + 3, 1) _
& vbCrLf _
& vbCrLf + ListBox1.List(n + 4, 1) _
& vbCrLf _
& vbCrLf + ListBox1.List(n + 5, 1) _
& vbCrLf _
& vbCrLf + ListBox1.List(n + 6, 1) _
& vbCrLf _
& vbCrLf + ListBox1.List(n + 7, 1) _
& vbCrLf
With the code above and images below, can anyone "see" what's causing the error in the code excel doesn't like.
Thanks for anyone's help. cr