Send a command down a column

  • Thread starter Thread starter mary
  • Start date Start date
M

mary

I regularly have report output of varying sizes that will have one column of
data (the column changes position too) that has hyperlinks. How can I record
a macro to remove the hyperlink for the entire row? I essentially want to
send the command down an unlimited number of rows.
 
the following sub should help:
----------------------------------------------------------------
sub ClearHL()

dim int_col as integer

int_col = 2 ' inputbox "Please put in the number of the column"

Columns(int_col).Hyperlinks.Delete

end sub
----------------------------------------------------------------

you can set int_col in various ways...just change it to what suits you
best.

hth

Carlo
 
One way is to highlight the column which contains the hyperlinks, by
clicking on the column letter.

Then ALT-F11 (will bring up the Visual Basic Editor)
CTRL-G (will open the Immediate Window)
then type the following:

selection.hyperlinks.delete (Enter)

Then close the VBE to return to the worksheet.

Hope this helps.

Pete
 

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