Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Run time Error

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").ListFillRan ge = "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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Run time Error

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").ListFillRan ge = _
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").ListFillRan ge = "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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Run time Error

I change it to :
Sheets("Home").OLEObjects("ListBox1").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Run time Error

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Run time Error

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Run time Error

You are going to have to look at the properties in the Listbox.

1) go to spreadsheet menu view - toolbars - Control toolbox
2) Press the triangle on the toolbar to go into Design Mode. Design mode
button is a toggle button the Enters/Exit.
3) right click Listbox and select properties. Look at ListRange propertiy
to see if it is correct
4) Press triagle again to exit Design Mode.

"ranswrt" wrote:

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Run time Error

It show ListFillRange as $D$6:$D$7 which is the correct cell names, but I
don't know if it refers to the right sheet. The sheet with the range that I
want to get the data from is different than the sheet that contains the
listbox.

"Joel" wrote:

You are going to have to look at the properties in the Listbox.

1) go to spreadsheet menu view - toolbars - Control toolbox
2) Press the triangle on the toolbar to go into Design Mode. Design mode
button is a toggle button the Enters/Exit.
3) right click Listbox and select properties. Look at ListRange propertiy
to see if it is correct
4) Press triagle again to exit Design Mode.

"ranswrt" wrote:

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Run time Error

did you manually define the range or did you do it by code.

Manually: go back to menu Insert - Nme - Define and reselect the Range with
the correct worksheet.

Code : add sheet name

"=sheet1!$D$6:$D$7

"ranswrt" wrote:

It show ListFillRange as $D$6:$D$7 which is the correct cell names, but I
don't know if it refers to the right sheet. The sheet with the range that I
want to get the data from is different than the sheet that contains the
listbox.

"Joel" wrote:

You are going to have to look at the properties in the Listbox.

1) go to spreadsheet menu view - toolbars - Control toolbox
2) Press the triangle on the toolbar to go into Design Mode. Design mode
button is a toggle button the Enters/Exit.
3) right click Listbox and select properties. Look at ListRange propertiy
to see if it is correct
4) Press triagle again to exit Design Mode.

"ranswrt" wrote:

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Run time Error

Earlier in the code I am naming the range with:

Sheets("current db").Range(xcell.Offset.Offset(1, 0), xcell.Offset(num,
0)).name = "wrkshtrng"

This is done after an item has been removed from the range by deleting the
row that it is in. Latter in the procedure I use:

Sheets("Home").OLEObjects("ListBox1").ListFillRang e =
Range("wrkshtrng").Address

and my listbox is still blank.

"Joel" wrote:

did you manually define the range or did you do it by code.

Manually: go back to menu Insert - Nme - Define and reselect the Range with
the correct worksheet.

Code : add sheet name

"=sheet1!$D$6:$D$7

"ranswrt" wrote:

It show ListFillRange as $D$6:$D$7 which is the correct cell names, but I
don't know if it refers to the right sheet. The sheet with the range that I
want to get the data from is different than the sheet that contains the
listbox.

"Joel" wrote:

You are going to have to look at the properties in the Listbox.

1) go to spreadsheet menu view - toolbars - Control toolbox
2) Press the triangle on the toolbar to go into Design Mode. Design mode
button is a toggle button the Enters/Exit.
3) right click Listbox and select properties. Look at ListRange propertiy
to see if it is correct
4) Press triagle again to exit Design Mode.

"ranswrt" wrote:

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Run time Error

Did you try all the other suggestions at your earlier post?

Just curious.

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").ListFillRan ge = "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


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Run time Error

Yes I did

"Dave Peterson" wrote:

Did you try all the other suggestions at your earlier post?

Just curious.

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").ListFillRan ge = "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


--

Dave Peterson

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Run time Error

Her is the best answer. Names returns the full address but contains an equal
sign at the beginning. The MID() will remove the equal sign.

Sheets("Home").OLEObjects("ListBox1").ListFillRang e = _
Mid(Names("wrkshtrng").Value, 2)

"ranswrt" wrote:

Earlier in the code I am naming the range with:

Sheets("current db").Range(xcell.Offset.Offset(1, 0), xcell.Offset(num,
0)).name = "wrkshtrng"

This is done after an item has been removed from the range by deleting the
row that it is in. Latter in the procedure I use:

Sheets("Home").OLEObjects("ListBox1").ListFillRang e =
Range("wrkshtrng").Address

and my listbox is still blank.

"Joel" wrote:

did you manually define the range or did you do it by code.

Manually: go back to menu Insert - Nme - Define and reselect the Range with
the correct worksheet.

Code : add sheet name

"=sheet1!$D$6:$D$7

"ranswrt" wrote:

It show ListFillRange as $D$6:$D$7 which is the correct cell names, but I
don't know if it refers to the right sheet. The sheet with the range that I
want to get the data from is different than the sheet that contains the
listbox.

"Joel" wrote:

You are going to have to look at the properties in the Listbox.

1) go to spreadsheet menu view - toolbars - Control toolbox
2) Press the triangle on the toolbar to go into Design Mode. Design mode
button is a toggle button the Enters/Exit.
3) right click Listbox and select properties. Look at ListRange propertiy
to see if it is correct
4) Press triagle again to exit Design Mode.

"ranswrt" wrote:

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").ListFillRang e =
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").ListFillRan ge = _
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").ListFillRan ge = "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

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Run time Error

I didn't see it in any of your followup posts.

ranswrt wrote:

Yes I did

"Dave Peterson" wrote:

Did you try all the other suggestions at your earlier post?

Just curious.

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").ListFillRan ge = "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


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run time error 1004 general odbc error excel 2003 vba Mentos Excel Programming 5 January 24th 11 02:56 PM
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Urgent!!! Run-time error '-2147024770 (8007007e)' Automation error [email protected] Excel Programming 3 May 28th 08 04:51 AM
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM


All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"