Results 1 to 2 of 2

Thread: Deleting a picture/link...[Solved]

  1. #1

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Deleting a picture/link...[Solved]

    This is weird but for something new I am making at work I am automatically formatting the lists pasted directly from a web page.

    For each persons name with stats there is a link that takes you to the details page. The problem is that when you paste everything in, you have these pictures that are the same links that you have to delete one at a time, Right click > Cut, so on.

    I know there is a way to do this with VBA but I just cannot seem to figure it out, I will keep screwing with it but if anyone here can help I will be grateful.
    Last edited by Spajeoly; Mar 30th, 2003 at 08:42 PM.

  2. #2

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Ok, I figured it out, took me 10 minutes lol...

    VB Code:
    1. On Error Resume Next
    2. Do Until Sheet1.Shapes.Count = 0
    3.     For i = 1 To Sheet1.Shapes.Count
    4.         Sheet1.Shapes(i).Delete
    5.     Next i
    6. Loop

    If you do not have the "On Error Resume Next in there you will get a motherload of invalid array errors because the pictures do not always increment themselves right.

    Though this only works for me because I do not use buttons or other Visual Basics componants in my work sheets, I just create buttons from cells etc. lol.
    Last edited by Spajeoly; Mar 30th, 2003 at 08:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width