Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default ListBox does not support saving

Hello Experts

I have recently started getting an error in Excel 2003 SP3.

I have a ListBox (from Control Toolbox) with name lstExistingProducts.

When Excel does an automatic save of the workbook or when I do a save,
I get the message that the "Control lstExistingProducts does not
support saving". The message suggests that I should delete the control
and then save the workbook.

Can you please help in case you have come across this problem.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default ListBox does not support saving

Posting the code that causes the error message will usually get a better
response.

"Alok" wrote:

Hello Experts

I have recently started getting an error in Excel 2003 SP3.

I have a ListBox (from Control Toolbox) with name lstExistingProducts.

When Excel does an automatic save of the workbook or when I do a save,
I get the message that the "Control lstExistingProducts does not
support saving". The message suggests that I should delete the control
and then save the workbook.

Can you please help in case you have come across this problem.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default ListBox does not support saving

On Sep 2, 5:39*am, JLGWhiz wrote:
Posting the code that causes the error message will usually get a better
response.



"Alok" wrote:
Hello Experts


I have recently started getting an error in Excel 2003 SP3.


I have a ListBox (from Control Toolbox) with name lstExistingProducts.


When Excel does an automatic save of the workbook or when I do a save,
I get the message that the "Control lstExistingProducts does not
support saving". The message suggests that I should delete the control
and then save the workbook.


Can you please help in case you have come across this problem.- Hide quoted text -


- Show quoted text -


Here is the code:

'Background:
'A list box shows the list of existing products.
'The list box is called lstExistingProducts.
'The ListFillRange of the lstExistingProducts is called ListOfProducts
'DoDeleteProduct routine deletes the Product in the database.
'The routine RefreshCurrentProductList refreshes the ListOfProducts
range from database
'ListExistingProducts.ListFillRange is again set so that a refresh of
the ListBox takes place
'This line causes the problem. "Could not set the ListCursor property.
Not enough storage is available to complete this operation"
'After getting this error, I would get the following error:
'Microsoft Office Excel cannot save this workbook because the control
named lstExistingProducts does not support saving. To save the
workbook, delete this control, and then try the save again."
'Note that the problem happened only if the last item in the
lstExistingProducts had been clicked on for deletion.
'I was able to resolve the problem by first unselecting the selected
item by adding the code
'lstExistingProducts.ListIndex = -1 between
'RefreshCurrentProductList and
'lstExistingProducts.ListFillRange = "ListOfProducts"

Private Sub butDeleteProduct_Click()
Dim sExistingProduct$

sExistingProduct = lstExistingProducts.Text
If sExistingProduct < "" Then
If MsgBox("Do you want to delete " & sExistingProduct & "?",
vbYesNo) = vbYes Then
DoDeleteProduct sExistingProduct
RefreshCurrentProductsList
lstExistingProducts.ListFillRange = "ListOfProducts"
End If
Else
MsgBox "Please note that you must first select a product and
then click on the 'Delete Product' button."
End If
End Sub

As you will see from the background the problem was solved in a
roundabout way by me. If you have another solution, please let me
know.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default ListBox does not support saving

Glad you found a solution.

"Alok" wrote:

On Sep 2, 5:39 am, JLGWhiz wrote:
Posting the code that causes the error message will usually get a better
response.



"Alok" wrote:
Hello Experts


I have recently started getting an error in Excel 2003 SP3.


I have a ListBox (from Control Toolbox) with name lstExistingProducts.


When Excel does an automatic save of the workbook or when I do a save,
I get the message that the "Control lstExistingProducts does not
support saving". The message suggests that I should delete the control
and then save the workbook.


Can you please help in case you have come across this problem.- Hide quoted text -


- Show quoted text -


Here is the code:

'Background:
'A list box shows the list of existing products.
'The list box is called lstExistingProducts.
'The ListFillRange of the lstExistingProducts is called ListOfProducts
'DoDeleteProduct routine deletes the Product in the database.
'The routine RefreshCurrentProductList refreshes the ListOfProducts
range from database
'ListExistingProducts.ListFillRange is again set so that a refresh of
the ListBox takes place
'This line causes the problem. "Could not set the ListCursor property.
Not enough storage is available to complete this operation"
'After getting this error, I would get the following error:
'Microsoft Office Excel cannot save this workbook because the control
named lstExistingProducts does not support saving. To save the
workbook, delete this control, and then try the save again."
'Note that the problem happened only if the last item in the
lstExistingProducts had been clicked on for deletion.
'I was able to resolve the problem by first unselecting the selected
item by adding the code
'lstExistingProducts.ListIndex = -1 between
'RefreshCurrentProductList and
'lstExistingProducts.ListFillRange = "ListOfProducts"

Private Sub butDeleteProduct_Click()
Dim sExistingProduct$

sExistingProduct = lstExistingProducts.Text
If sExistingProduct < "" Then
If MsgBox("Do you want to delete " & sExistingProduct & "?",
vbYesNo) = vbYes Then
DoDeleteProduct sExistingProduct
RefreshCurrentProductsList
lstExistingProducts.ListFillRange = "ListOfProducts"
End If
Else
MsgBox "Please note that you must first select a product and
then click on the 'Delete Product' button."
End If
End Sub

As you will see from the background the problem was solved in a
roundabout way by me. If you have another solution, please let me
know.

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
Does not support automation or does not support expected interface Maverick Excel Programming 0 September 21st 06 09:31 AM
listbox saving ? pm Excel Programming 5 August 31st 04 06:07 AM
Listbox9 does not support saving..... Craig[_8_] Excel Programming 0 October 28th 03 07:59 PM
Listbox does not support saving Jon[_12_] Excel Programming 2 October 9th 03 10:24 AM
Saving listbox values to a sheet then repopulate Stuart[_5_] Excel Programming 4 September 15th 03 09:17 PM


All times are GMT +1. The time now is 02:29 AM.

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

About Us

"It's about Microsoft Excel"