not to sure why I get this when trying to load my userform, I have checked the spelling and not quite to sure of any other casuses
![]()
Sub Button1_Click() FindInvoice.Show End Sub
not to sure why I get this when trying to load my userform, I have checked the spelling and not quite to sure of any other casuses
![]()
Sub Button1_Click() FindInvoice.Show End Sub
There's no other cause, a referenced object does not exist.
Either you don't have a userform called 'FindInvoice' or else code in the userform refers to another object that doesn't exist. There's not enough information in your very brief post to say for sure
You can check it by just open your project explorer(Alt+F11) and press F8 for step by step to see what is missing in your form.
Kamboj
_________________________________________________________________________________
Mark the thread as SOLVED if my answer satisfy you.
so by setting the break points ive traced It back to the line where is try to add my dynamic named range to combobox2
below is the code in the named range to add the jobs to the range, it seems to work in the names section?![]()
Private Sub UserForm_Initialize() ComboBox1.List = Range("janinvoices").Value ComboBox2.List = Range("jobs").Value End Sub
=OFFSET(jobs!$A$2,0,0,COUNTA(jobs!$A:$A),1)
Giving a named range the same name as one of your worksheets might cause issues, but.
Have you tried syntax like
That will also cause problems if there is only one value in the column. The .Value of a one cell range is not an array so the .List will balk.![]()
Me.ComboBox2.List = ThisWorkbook.Names("jobs").RefersToRange.Value
Last edited by mikerickson; 09-17-2016 at 10:55 AM.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks