hi

You will get error if no value is added in list box.

add line "on error resume next" in beginning to avoid this error..

cheers

+++++
*I did not do this for you. God is here working through me for you.*

On Fri, Dec 12, 2014 at 1:03 AM, Rob Flott <robfl...@gmail.com> wrote:
>
> On a worksheet I have two listboxes; ListBox1 and ListBox3.  Dependant
> upon what is selected in ListBox1...it will automatically enter the
> appropriate range into the ListFillRange of ListBox3:
>
> Private Sub ListBox1_Click()
>    With ListBox3
>        .ListFillRange = Sheets(2).Range("T30")
>        .Selected(0) = True
>    End With
> End Sub
>
> This macro works fine while the workbook is open...however whenever I open
> the workbook I get the error message: Run Time Error 424 "Object required"
>
> And when I debug it highlights:
>  .ListFillRange = Sheets(2).Range("T30")
> The only other code I have is on the Workbook_Open:
>
> Private Sub Workbook_Open()
>    Dim TWB As ThisWorkbook
>    Dim Report As Worksheet
>    Dim List As Worksheet
>
>    Set Report = ThisWorkbook.Sheets(1)
>    Set List = ThisWorkbook.Sheets(2)
>
>    Report.Select
>     With Report.OLEObjects
>      .Select
>     End With
>
> End Sub
>
> Can anyone guide me on how to correct this problem?
>
> Thank you
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to