Hi Biffer,
I hope I interpreted your requirements correctly:
a. Find the Last Row in Sheet 'Data Refined'
b. Use the row after the Last Row
c. Put up to 3 items from the ListBox in the row after the Last Row starting at column 17 (= Q).
Please let me know if this is not what you want.
Try the following code. I removed the items that you weren't having problems with for ease of debugging. It is easier for me to debug when I add extra variables such as bItemBeenSelected.
The following may help you now and in the future:
Debugger Secrets:
a. Press 'F8' to single step (goes into subroutines and functions).
b. Press SHIFT 'F8' to single step OVER subroutines and functions.
c. Press CTRL 'F8' to stop at the line where the cursor is.
d. 'Left Click' the margin to the left of a line to set (or clear) a BREAKPOINT.
e. Press CTRL 'G' to open the IMMEDIATE WINDOW. 'debug.print' statements send their
output to the IMMEDIATE WINDOW.
f. Select View > Locals to see all variables while debugging.
g. To automatically set a BREAKPOINT at a certain location put in the line:
'Debug.Assert False'
h. To conditionally set a BREAKPOINT at a certain location put in lines similar to:
if i >= 20 and xTV20 > 99.56 then
Debug.Assert False
endif
i. A variable value will be displayed by putting the cursor over the variable name.
Lewis
Bookmarks