![]() |
Absolute/Relative Referencing & Buttons!
Hello all,
I have a very long spreadsheet where I have recorded a macro to take you back to a cell reference up near the top of the spreadsheet. This macro is assigned to a button. Trouble is, I now need to delete some rows & columns of the spreadsheet and when I do that the button no longer takes me back to the right cell. If I delete a row, it takes me to the cell one row above. Same with columns. Is there some way of amending the code so that it always goes back to that same cell, even though I delete rows/colums? Thanks muchly! |
Absolute/Relative Referencing & Buttons!
Create a name for the cell - say -CellToGoto
This you do by clicking on the Cell and then typing the above name in the name box. Then add this code to go to that cell application.Goto Range("Celltogoto"),true Alok Joshi "Angela" wrote: Hello all, I have a very long spreadsheet where I have recorded a macro to take you back to a cell reference up near the top of the spreadsheet. This macro is assigned to a button. Trouble is, I now need to delete some rows & columns of the spreadsheet and when I do that the button no longer takes me back to the right cell. If I delete a row, it takes me to the cell one row above. Same with columns. Is there some way of amending the code so that it always goes back to that same cell, even though I delete rows/colums? Thanks muchly! |
Absolute/Relative Referencing & Buttons!
Thanks Alok, worked a dream!
Much appreciated. "Alok" wrote: Create a name for the cell - say -CellToGoto This you do by clicking on the Cell and then typing the above name in the name box. Then add this code to go to that cell application.Goto Range("Celltogoto"),true Alok Joshi "Angela" wrote: Hello all, I have a very long spreadsheet where I have recorded a macro to take you back to a cell reference up near the top of the spreadsheet. This macro is assigned to a button. Trouble is, I now need to delete some rows & columns of the spreadsheet and when I do that the button no longer takes me back to the right cell. If I delete a row, it takes me to the cell one row above. Same with columns. Is there some way of amending the code so that it always goes back to that same cell, even though I delete rows/colums? Thanks muchly! |
All times are GMT +1. The time now is 02:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com