Spin Box

S

Squeaky

Hi All,

I have a spin box linked to a cell.
I need to be able to run code that will attach the spin box to a different
cell 13 rows down. The current location of the cell can vary depending on how
many rows are insterted above it, so I cannot simply redefine the spin button
with a fixed cell reference. The new cell can not have a range name.

Thanks,

Squeaky
 
R

ryguy7272

Can you work with one of these concepts?

Find Last Used Cell:
Sub FindLastCell1()
Cells(Rows.Count, "A").End(xlUp).Select
End Sub

Sub FindLastCell2()
Range("A:A").Find("*", Cells(1), _
xlValues, xlWhole, xlByRows, xlPrevious).Select
End Sub

Find the end of a list? Here are a couple different ways:
this will select the cell. it's not a good practice to select, but just used
as
an illustration here.
range(worksheets("Sheet1").cells(rows.Count,"A").end(xlup).address).Select

or if you just want A5 returned:
lastcell = worksheets("Sheet1").cells(rows.Count,"A").end(xlup).address(0,0)

HTH,
Ryan---
 
S

Squeaky

Hi Ryan,

How do I get this to attach itself to the spin button's linked cell reference?

Squeaky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top