Sort & lose links

K

Karen53

Hi,

I have worksheets containing links to the main page and vice versa. The
links are inserted by vba. The main page needs to be in order. How can I
sort and not lose my links? I am assuming R[3]C[-2] might do it? In this
case the columns will be constant but the rows will change, so R is a
variable. How would I do this using a variable since I don't know where the
row will be? Or would I still lose my links?

I tried this but did not get the results I was looking for.

"'!R[-" & NextRow - 2 & "]C5"

The cell containing the link is in row 2 of the worksheet.

Thanks for your help.
 
K

Karen53

Hi,

I got it. It should have been plus not minus.

R[+" & NextRow - 2 & "]C5

duuuuuuuhhh!!
 

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