Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Excel VBA - Clearing Shapes and Cell Contents

Hello;

I have an Excel spreadsheet which I use to import images and create sort of a product catalog. It's working great.

However, I'm unable to come up with code that works for clearing/resetting the page. I've tried 3 or 4 different ways without any success.

What I need to do is clear all cell contents and shapes (images) within every column but "A". Anybody have a code sample that would do this??

Thanks in advance for your help. I appreciate it!

Rick


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA - Clearing Shapes and Cell Contents

Activesheet.Range("B:IV").ClearContents
for each shp in ActiveSheet.Shapes
shp.delete
Next

--
Regards,
Tom Ogilvy



"Rick" wrote in message
...
Hello;

I have an Excel spreadsheet which I use to import images and create sort

of a product catalog. It's working great.

However, I'm unable to come up with code that works for clearing/resetting

the page. I've tried 3 or 4 different ways without any success.

What I need to do is clear all cell contents and shapes (images) within

every column but "A". Anybody have a code sample that would do this??

Thanks in advance for your help. I appreciate it!

Rick




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Excel VBA - Clearing Shapes and Cell Contents

Thanks Tom. It looks like that would delete all shapes on the sheet. I have two command buttons and a graphic in column A that I would like to retain while deleting the shapes on the rest of the sheet. Any ideas? Thanks in advance

Rick
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
Selectively Clearing cell contents jdd Excel Worksheet Functions 2 April 22nd 06 04:06 AM
Clearing Contents of Cell Burt Excel Worksheet Functions 1 May 4th 05 02:46 PM
Excel VBA - Remove Shapes and Cell Contents rick6823 Excel Programming 1 April 11th 04 10:50 PM
Clearing Cell Contents Lee Excel Programming 2 February 11th 04 10:23 PM
Clearing cell contents automatically Tom Ogilvy Excel Programming 2 August 21st 03 04:07 AM


All times are GMT +1. The time now is 05:20 PM.

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

About Us

"It's about Microsoft Excel"