Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing a Sheet of Everything (including pictures) 1

Status
Not open for further replies.

IdoMillet

Instructor
Feb 6, 2001
5,290
US
I can clear all cell content of a sheet by calling:
Code:
xlsheet.Cells.Clear

However, I need to clear the sheet from ALL content, including pictures (which remain after the call above).

I cannot delete & recreate the sheet (I need to just clear its content).

Any suggestions?

Thanks,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Hi,

Code:
dim sh as shape
xlsheet.Cells.Clear
for each sh in xlsheet.shapes
  sh.delete
next


Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
Thanks, Skip.

I'm trying:
Code:
xlsheet.Shapes.SelectAll
xlApp.Selection.Delete

If that dioesn't work, I'll try your approach.

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
The simpler approach I tried seems to work well.

Thanks for the suggestion though.

Regards,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 

Code:
xlsheet.Shapes.Delete

Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top