Macros and deleting a column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a "contents" sheet which has numerous buttons which take users to a
cell on a separate worksheet.

I'd like to delete some of the columns in the worksheet as they are no
longer needed. When I do this however the macro doesn't amend to the new cell
reference.

There's a lot of coulmns to delete and a lot of macros that won't work.

Any ideas gratefully received.
 
Is there anything to see on the buttons or are they just for links?

I am guessing you just had them for links, and would probably do
much better without buttons and use
hyperlinks in the cells either object hyperlinks (ctrl+k) or
HYPERLINK Worksheet Formulas
or with an event macro when you select a cell to let the
macro figure out where you want to go if you can determine
that such as based on the cell in column A of the row.

Some coding that might be of help depending on what you have
and what you need to do.

Extract and Place Hyperlink from Shape into cell to the right
http://www.mvps.org/dmcritchie/excel/shapes.htm#ExtractLinkToRightOfShapes

Event Macro to figure out where to go -- FollowHyperlink
allows you to use the browser shortcut keys back and Forward.
http://www.mvps.org/dmcritchie/excel/event.htm#ws_fh

Coding a link address and friendly name using HYPERLINK Worksheet function (#hyperlink)
http://www.mvps.org/dmcritchie/excel/sheets.htm#hyperlink
The trick is to keep the cell addresses out of the double quotes so that
they will automatically adjust when you move columns around, rename worksheets, etc.

More information on hyperlinks throughtout...
http://www.mvps.org/dmcritchie/excel/buildtoc.htm
 
Thanks for the help. I think I'm sorted now.



David McRitchie said:
Is there anything to see on the buttons or are they just for links?

I am guessing you just had them for links, and would probably do
much better without buttons and use
hyperlinks in the cells either object hyperlinks (ctrl+k) or
HYPERLINK Worksheet Formulas
or with an event macro when you select a cell to let the
macro figure out where you want to go if you can determine
that such as based on the cell in column A of the row.

Some coding that might be of help depending on what you have
and what you need to do.

Extract and Place Hyperlink from Shape into cell to the right
http://www.mvps.org/dmcritchie/excel/shapes.htm#ExtractLinkToRightOfShapes

Event Macro to figure out where to go -- FollowHyperlink
allows you to use the browser shortcut keys back and Forward.
http://www.mvps.org/dmcritchie/excel/event.htm#ws_fh

Coding a link address and friendly name using HYPERLINK Worksheet function (#hyperlink)
http://www.mvps.org/dmcritchie/excel/sheets.htm#hyperlink
The trick is to keep the cell addresses out of the double quotes so that
they will automatically adjust when you move columns around, rename worksheets, etc.

More information on hyperlinks throughtout...
http://www.mvps.org/dmcritchie/excel/buildtoc.htm
 
Glad you're to have helped, newsgroups are great.

Since I can't tell ahead of time what solution might work for you, I try to
provide several possibilities. some related to each other. Was there
any particular direction that you took to solve your problem.

Was I correct in assuming you could replace the buttons with links
with more conventional hyperlinks or an event macro. Or did you
just use the information to correct the links within the button shapes.
 

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

Back
Top