Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REmove Hyper links in excel 2000 2

Status
Not open for further replies.

rexrivas

Technical User
Apr 19, 2004
20
US
How can i delete a columns worth of hyperlinks and graphics.THe problem is that each shape has its own shape name ("picture x").

I wrote a simple macro

Sub A_Hyper()
'
' A_Hyper Macro

'
ActiveSheet.Shapes("Picture 4").Select
Selection.ShapeRange.Item(1).Hyperlink.Delete
Selection.Delete
ActiveSheet.Shapes("Picture 5").Select
Selection.ShapeRange.Item(1).Hyperlink.Delete
Selection.Delete
End Sub
 
Hi rexrivas,

Given a set of rules it should be possible, so how do you know which Shapes and/or Hyperlinks belong to your column?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
it's all in column A. THe shapes all seem to be picture, but each one has a unique name: picture 1 , picture 2 and so on.
 
Hi rexrivas,

Sorry. What I meant was how do you know which shapes belong to column A and which to column B, etc.? And are all your hyperlinks in Shapes or are some in cells, and do all your shapes have hyperlinks? etc. Exactly what, in other words, do you want to delete and what do you want to keep?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
i want delete all shapes in column A along with their hyperlinks. column A currently contains Data, image(shape) and hyperlink. Alli need is the data
 
Are the pictures you refere to the ONLY objects on that sheet? If so then how about a simple Edit / Go To / Special / Objects, then hit the delete button. If you have other objects though you really don't want to go this route :)

As for the links, try selecting them all at once and running this:-

Sub DelLinks
On Error Resume Next
selection.hyperlinks.delete
End Sub

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
The Edit / Go To / Special / Objects work perfectly, it evens eliminates the links


Thanks a gazillion
 
Aaahhhhh - The links were links to the images then - apologies for being dense as I hadn't picked up on that bit. I guess if you remove the link target then you remove the link.

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top