ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Delete syntax problem (https://www.excelbanter.com/excel-worksheet-functions/67775-delete-syntax-problem.html)

anny

Delete syntax problem
 
Greetings

I'm having trouble using VB to delete the contents of a table (range
A10:P40). The cells just contain values, no formulas. The table is
formatted with borders, and I don't want those deleted.

Is the syntax Worksheets("Data").Range("A10:P40").Delete ???


Thanks
anny





Jim Cone

Delete syntax problem
 
anny,

Use .ClearContents instead of .Delete

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"anny" wrote in message
Greetings
I'm having trouble using VB to delete the contents of a table (range
A10:P40). The cells just contain values, no formulas. The table is
formatted with borders, and I don't want those deleted.

Is the syntax Worksheets("Data").Range("A10:P40").Delete ???

Thanks
anny





Peo Sjoblom

Delete syntax problem
 
Try

ClearContents

instead of delete

--
Regards,

Peo Sjoblom

Portland, Oregon




"anny" wrote in message
...
Greetings

I'm having trouble using VB to delete the contents of a table (range
A10:P40). The cells just contain values, no formulas. The table is
formatted with borders, and I don't want those deleted.

Is the syntax Worksheets("Data").Range("A10:P40").Delete ???


Thanks
anny






Bri

Delete syntax problem
 
thanks to both!
anny




All times are GMT +1. The time now is 06:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com