PC Review


Reply
Thread Tools Rate Thread

Deleting Objects Q

 
 
John
Guest
Posts: n/a
 
      7th Oct 2006
I have a piece of code below that deletes all objects within my sheet
"Current". But what I'm finding is that Cell C6 is being deleted and all
cells in this column shift up one. Why would this happen? I have just run
the macro below only, so there is no other influences, but can't understand
why it is happening. If I run it a second time it deletes another row and
again shifts up one cell.

Any help appreciated


Sub ClearMacroButtons()

Sheets("Current").Select
ActiveSheet.DrawingObjects.Select
Selection.Delete
Range("A1").Select
End Sub


 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      7th Oct 2006
Prolem solved I was missing "Cells.Select"









"John" <r.@9999yahoo.co.uk> wrote in message
news:eg7rb4$52l$(E-Mail Removed)...
>I have a piece of code below that deletes all objects within my sheet
>"Current". But what I'm finding is that Cell C6 is being deleted and all
>cells in this column shift up one. Why would this happen? I have just run
>the macro below only, so there is no other influences, but can't understand
>why it is happening. If I run it a second time it deletes another row and
>again shifts up one cell.
>
> Any help appreciated
>
>
> Sub ClearMacroButtons()
>
> Sheets("Current").Select
> ActiveSheet.DrawingObjects.Select
> Selection.Delete
> Range("A1").Select
> End Sub
>
>



 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      7th Oct 2006
Hi John

See
http://www.rondebruin.nl/controlsobjectsworksheet.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"John" <r.@9999yahoo.co.uk> wrote in message news:eg7rb4$52l$(E-Mail Removed)...
>I have a piece of code below that deletes all objects within my sheet "Current". But what I'm finding is that Cell C6 is being
>deleted and all cells in this column shift up one. Why would this happen? I have just run the macro below only, so there is no
>other influences, but can't understand why it is happening. If I run it a second time it deletes another row and again shifts up
>one cell.
>
> Any help appreciated
>
>
> Sub ClearMacroButtons()
>
> Sheets("Current").Select
> ActiveSheet.DrawingObjects.Select
> Selection.Delete
> Range("A1").Select
> End Sub
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
re: deleting objects bakalimbakalim Microsoft Powerpoint 1 25th Dec 2007 05:05 AM
Deleting Objects Using VBA =?Utf-8?B?VWxyaWNoMTk0Nw==?= Microsoft Access VBA Modules 3 7th Mar 2006 11:41 AM
deleting objects =?Utf-8?B?TGFycnkgU2FydG9yaXM=?= Microsoft Excel Programming 3 22nd Jun 2005 05:15 PM
Deleting Objects De Windows XP General 1 13th May 2004 05:31 PM
deleting objects using VBA cweijden Microsoft Excel Programming 1 26th Nov 2003 03:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 PM.