+ Reply to Thread
Results 1 to 4 of 4

deleting objects

  1. #1
    Larry Sartoris
    Guest

    deleting objects

    I have a confusing question to ask. (Hopefully it won't be too confusing).

    I have this picture made up of different lines (autoshapes). What I want to
    do is, is use an inpubox and take info in. Depending on the info (just
    numbers) I want to delete certain lines. And then I want to "replace" them
    when I run the macro again.
    (like a "reset"). I have this all down...

    My problem is when I "replace" the line, I don't know how to delete that
    line later. It'll have a different autoshape #. That's how I was keeping
    track of the lines originally.

    If I was a little too confusing let me know. I'll try and explain it
    further. Thanks so much!

  2. #2
    Tom Ogilvy
    Guest

    Re: deleting objects

    why not copy the shape, delete the lines, hide the original. to reset,
    delete the copy, unhide the original.

    --
    Regards,
    Tom Ogilvy

    "Larry Sartoris" <[email protected]> wrote in message
    news:[email protected]...
    > I have a confusing question to ask. (Hopefully it won't be too

    confusing).
    >
    > I have this picture made up of different lines (autoshapes). What I want

    to
    > do is, is use an inpubox and take info in. Depending on the info (just
    > numbers) I want to delete certain lines. And then I want to "replace"

    them
    > when I run the macro again.
    > (like a "reset"). I have this all down...
    >
    > My problem is when I "replace" the line, I don't know how to delete that
    > line later. It'll have a different autoshape #. That's how I was keeping
    > track of the lines originally.
    >
    > If I was a little too confusing let me know. I'll try and explain it
    > further. Thanks so much!




  3. #3
    Larry Sartoris
    Guest

    Re: deleting objects

    only a few problems with that i think? I can't seem to select the hidden
    original. I like your idea I might be able to work with that. I just get an
    error when I try to select a hidden object:

    Sub lines()
    ActiveSheet.Shapes.Range(Array("AutoShape 42", "AutoShape 43",
    "AutoShape 45", "AutoShape 46")).Select
    Selection.Copy
    Selection.Visible = False
    ActiveSheet.Shapes.Range(Array("AutoShape 42", "AutoShape 43",
    "AutoShape 45", "AutoShape 46")).Select
    Selection.Visible = True
    End Sub

    "Tom Ogilvy" wrote:

    > why not copy the shape, delete the lines, hide the original. to reset,
    > delete the copy, unhide the original.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Larry Sartoris" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have a confusing question to ask. (Hopefully it won't be too

    > confusing).
    > >
    > > I have this picture made up of different lines (autoshapes). What I want

    > to
    > > do is, is use an inpubox and take info in. Depending on the info (just
    > > numbers) I want to delete certain lines. And then I want to "replace"

    > them
    > > when I run the macro again.
    > > (like a "reset"). I have this all down...
    > >
    > > My problem is when I "replace" the line, I don't know how to delete that
    > > line later. It'll have a different autoshape #. That's how I was keeping
    > > track of the lines originally.
    > >
    > > If I was a little too confusing let me know. I'll try and explain it
    > > further. Thanks so much!

    >
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: deleting objects

    OK, then why not just change the colorindex of the line to xlnone, then to
    reset it, loop through all the lines and set the colorindex back.

    --
    Regards,
    Tom Ogilvy


    "Larry Sartoris" <[email protected]> wrote in message
    news:[email protected]...
    > only a few problems with that i think? I can't seem to select the hidden
    > original. I like your idea I might be able to work with that. I just get

    an
    > error when I try to select a hidden object:
    >
    > Sub lines()
    > ActiveSheet.Shapes.Range(Array("AutoShape 42", "AutoShape 43",
    > "AutoShape 45", "AutoShape 46")).Select
    > Selection.Copy
    > Selection.Visible = False
    > ActiveSheet.Shapes.Range(Array("AutoShape 42", "AutoShape 43",
    > "AutoShape 45", "AutoShape 46")).Select
    > Selection.Visible = True
    > End Sub
    >
    > "Tom Ogilvy" wrote:
    >
    > > why not copy the shape, delete the lines, hide the original. to reset,
    > > delete the copy, unhide the original.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Larry Sartoris" <[email protected]> wrote in

    message
    > > news:[email protected]...
    > > > I have a confusing question to ask. (Hopefully it won't be too

    > > confusing).
    > > >
    > > > I have this picture made up of different lines (autoshapes). What I

    want
    > > to
    > > > do is, is use an inpubox and take info in. Depending on the info

    (just
    > > > numbers) I want to delete certain lines. And then I want to "replace"

    > > them
    > > > when I run the macro again.
    > > > (like a "reset"). I have this all down...
    > > >
    > > > My problem is when I "replace" the line, I don't know how to delete

    that
    > > > line later. It'll have a different autoshape #. That's how I was

    keeping
    > > > track of the lines originally.
    > > >
    > > > If I was a little too confusing let me know. I'll try and explain it
    > > > further. Thanks so much!

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1