Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Objects all at once - (copied HTML to excel) coastal Excel Discussion (Misc queries) 4 June 26th 07 08:26 PM
Deleting HTML form objects? GeorgeM Excel Discussion (Misc queries) 3 December 29th 06 11:24 PM
Deleting Objects Copied from Web Page Tim Childs Excel Discussion (Misc queries) 3 February 21st 06 10:49 PM
deleting objects using VBA cweijden Excel Programming 1 November 26th 03 03:45 PM
Deleting name-objects Tom Excel Programming 5 November 24th 03 07:18 PM


All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"