From: ranswrt on
I have a procedure the deletes a sheet and updates a listbox on a worksheet.
I get the following error when this part of the code is ran
"Sheets("Home").OLEObjects("ListBox1").ListFillRange = "wrkshtrng""

The error I get is this:

run-time error '-2147352567 (80020009)':
Could not set the listcursor property. Not enough storage is available to
complete this operation.

What could possibly be causing this?
Thankx
From: Joel on
Why do you have two double quotes at the end of the line

AGAIN if "wrkshtrng" is a defined name then it should be

"Sheets("Home").OLEObjects("ListBox1").ListFillRange = _
Range("wrkshtrng").address


"ranswrt" wrote:

> I have a procedure the deletes a sheet and updates a listbox on a worksheet.
> I get the following error when this part of the code is ran
> "Sheets("Home").OLEObjects("ListBox1").ListFillRange = "wrkshtrng""
>
> The error I get is this:
>
> run-time error '-2147352567 (80020009)':
> Could not set the listcursor property. Not enough storage is available to
> complete this operation.
>
> What could possibly be causing this?
> Thankx
From: ranswrt on
I change it to :
Sheets("Home").OLEObjects("ListBox1").ListFillRange =
Range("wrkshtrng").Address
The listbox is blank now.
"Joel" wrote:

> Why do you have two double quotes at the end of the line
>
> AGAIN if "wrkshtrng" is a defined name then it should be
>
> "Sheets("Home").OLEObjects("ListBox1").ListFillRange = _
> Range("wrkshtrng").address
>
>
> "ranswrt" wrote:
>
> > I have a procedure the deletes a sheet and updates a listbox on a worksheet.
> > I get the following error when this part of the code is ran
> > "Sheets("Home").OLEObjects("ListBox1").ListFillRange = "wrkshtrng""
> >
> > The error I get is this:
> >
> > run-time error '-2147352567 (80020009)':
> > Could not set the listcursor property. Not enough storage is available to
> > complete this operation.
> >
> > What could possibly be causing this?
> > Thankx
From: Joel on
Now go to your worksheet menu

Insert - Name - Define

Then click on "wrkshtrng"

Next check if there is any data in the address defined by "wrkshtrng"

"ranswrt" wrote:

> I change it to :
> Sheets("Home").OLEObjects("ListBox1").ListFillRange =
> Range("wrkshtrng").Address
> The listbox is blank now.
> "Joel" wrote:
>
> > Why do you have two double quotes at the end of the line
> >
> > AGAIN if "wrkshtrng" is a defined name then it should be
> >
> > "Sheets("Home").OLEObjects("ListBox1").ListFillRange = _
> > Range("wrkshtrng").address
> >
> >
> > "ranswrt" wrote:
> >
> > > I have a procedure the deletes a sheet and updates a listbox on a worksheet.
> > > I get the following error when this part of the code is ran
> > > "Sheets("Home").OLEObjects("ListBox1").ListFillRange = "wrkshtrng""
> > >
> > > The error I get is this:
> > >
> > > run-time error '-2147352567 (80020009)':
> > > Could not set the listcursor property. Not enough storage is available to
> > > complete this operation.
> > >
> > > What could possibly be causing this?
> > > Thankx
From: ranswrt on
There is data in that range

"Joel" wrote:

> Now go to your worksheet menu
>
> Insert - Name - Define
>
> Then click on "wrkshtrng"
>
> Next check if there is any data in the address defined by "wrkshtrng"
>
> "ranswrt" wrote:
>
> > I change it to :
> > Sheets("Home").OLEObjects("ListBox1").ListFillRange =
> > Range("wrkshtrng").Address
> > The listbox is blank now.
> > "Joel" wrote:
> >
> > > Why do you have two double quotes at the end of the line
> > >
> > > AGAIN if "wrkshtrng" is a defined name then it should be
> > >
> > > "Sheets("Home").OLEObjects("ListBox1").ListFillRange = _
> > > Range("wrkshtrng").address
> > >
> > >
> > > "ranswrt" wrote:
> > >
> > > > I have a procedure the deletes a sheet and updates a listbox on a worksheet.
> > > > I get the following error when this part of the code is ran
> > > > "Sheets("Home").OLEObjects("ListBox1").ListFillRange = "wrkshtrng""
> > > >
> > > > The error I get is this:
> > > >
> > > > run-time error '-2147352567 (80020009)':
> > > > Could not set the listcursor property. Not enough storage is available to
> > > > complete this operation.
> > > >
> > > > What could possibly be causing this?
> > > > Thankx