0

I had this program running last week so i must have changed something that altered it but I can't figure out what it was I changed or why it's erroring out.

Private Sub edit_info_click()

If Me.Job_Name = "" Then 'this just checks for a blank entry
    MsgBox "Please select a bid in order to change info."
    Exit Sub
End If

job_locator = Split(Me.Job_Name.Value, ": ") 'here is the key for information being pulled>>(key-index:thing) 0:contractor name, 1:job name, 2:sheet name
lrow = find_lRow(1, Worksheets(job_locator(2)))

For i = 2 To lrow
    If Worksheets(job_locator(2)).Cells(i, 1).Value = CStr(job_locator(1)) Then 'check to see if Job Name is the same (note: arrays are 0 based but sheets are not)
            
            If Worksheets(job_locator(2)).Cells(i, 4).Value = job_locator(0) Then 'check to see if bid contractor is the same (note: arrays are 0 based but sheets are not)
                
                job_conf_msg = ""
                
                For j = 1 To 10 Step 1
                    job_conf_msg = job_conf_msg & Worksheets(job_locator(2)).Cells(1, j) & ":" & Worksheets(job_locator(2)).Cells(i, j) & vbCrLf 'insert bid information for supossed duplicate
                Next j
                
                response = MsgBox(vbCrLf & job_conf_msg & vbCrLf & "Is this the job you wish to edit?", vbYesNo, Title:="")
                    
                    If response = vbYes Then 'user will not submit bid because it is a duplicate if selected no
                    
                        Set curr_bid_address = Worksheets(job_locator(2)).Range(Cells(i, 1), Cells(i, 10)) 'this sets the the location to be called in the next userform to find the data
                        
                        Call init_job_info_editor
                        
                        curr_bid_address.Select
                        
                        Unload Me
                        
                        Exit Sub
                                            
                    End If
                
            End If


    End If
Next i

End Sub

It is particularly erroring out on this line

Set curr_bid_address = Worksheets(job_locator(2)).Range(Cells(i, 1), Cells(i, 10)) 'this sets the the location to be called in the next userform to find the data

If i use something predefined like Selection it will pass but even changing my variables to hard code will not pass the function>

0 Answers0