Im using this definition to dynamically name my data range. (Credit Skip)
I'm then using the name to populate a listbox via RowSource.
The problem I am having is when I use the following code to delete the listbox selected row from my worksheet I end up with a blank line at the bottom of my listbox for each row deleted.
Any ideas?
I tried the following:
f_icemain.l_Inventory.RemoveItem
(didn't work because I'm using rowsource to populate the listbox)
also tried refreshing my form as I thought it may be something residual as opposed to actually being there.
I'm also wondering if the range isn't getting refreshed after the row is deleted. Although I would suspect a blank row in place of the deleted one which isn't the case on the worksheet or form.
I'm using excel 2003 SP2.
[small]Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black[/small]
Code:
=OFFSET
(
INDIRECT("Sheet1!$A$1"),
1,
0,
CountA(Sheet1!$A:$A)-1,
CountA(Sheet1!$1:$1)
)
The problem I am having is when I use the following code to delete the listbox selected row from my worksheet I end up with a blank line at the bottom of my listbox for each row deleted.
Code:
Worksheets("IceDataSheet").Rows(f_IceMain.l_Inventory.ListIndex + 2).Delete
Any ideas?
I tried the following:
f_icemain.l_Inventory.RemoveItem
(didn't work because I'm using rowsource to populate the listbox)
also tried refreshing my form as I thought it may be something residual as opposed to actually being there.
I'm also wondering if the range isn't getting refreshed after the row is deleted. Although I would suspect a blank row in place of the deleted one which isn't the case on the worksheet or form.
I'm using excel 2003 SP2.
[small]Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black[/small]