Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting Objects all at once - (copied HTML to excel) | Excel Discussion (Misc queries) | |||
Deleting HTML form objects? | Excel Discussion (Misc queries) | |||
Deleting Objects Copied from Web Page | Excel Discussion (Misc queries) | |||
deleting objects using VBA | Excel Programming | |||
Deleting name-objects | Excel Programming |