ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vba line for clearing data from a cell (https://www.excelbanter.com/excel-discussion-misc-queries/244875-vba-line-clearing-data-cell.html)

cvgairport

vba line for clearing data from a cell
 
Hi all -

Is there a line of vba code that I could put into a startup macro to empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy

Luke M

vba line for clearing data from a cell
 
ActiveCell.ClearContents
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cvgairport" wrote:

Hi all -

Is there a line of vba code that I could put into a startup macro to empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy


cvgairport

vba line for clearing data from a cell
 
Awesome, but what if the user is not on the cell. I'd like to give the macro
a couple of cell locations to clear such as A2 and D45 and C13.

Thanks!

"Luke M" wrote:

ActiveCell.ClearContents
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cvgairport" wrote:

Hi all -

Is there a line of vba code that I could put into a startup macro to empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy


Gord Dibben

vba line for clearing data from a cell
 
Sheets("Sheet1").Range("A2, D45, C13").ClearContents


Gord Dibben MS Excel MVP

On Wed, 7 Oct 2009 13:07:01 -0700, cvgairport
wrote:

Awesome, but what if the user is not on the cell. I'd like to give the macro
a couple of cell locations to clear such as A2 and D45 and C13.

Thanks!

"Luke M" wrote:

ActiveCell.ClearContents
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cvgairport" wrote:

Hi all -

Is there a line of vba code that I could put into a startup macro to empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy



Otto Moehrbach[_2_]

vba line for clearing data from a cell
 
Range("A2,D45,C13").ClearContents. Otto
"cvgairport" wrote in message
...
Awesome, but what if the user is not on the cell. I'd like to give the
macro
a couple of cell locations to clear such as A2 and D45 and C13.

Thanks!

"Luke M" wrote:

ActiveCell.ClearContents
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cvgairport" wrote:

Hi all -

Is there a line of vba code that I could put into a startup macro to
empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy




cvgairport

vba line for clearing data from a cell
 
You guys rock! Wish I could find a class to teach me these things.

Thanks!

Amy

"Otto Moehrbach" wrote:

Range("A2,D45,C13").ClearContents. Otto
"cvgairport" wrote in message
...
Awesome, but what if the user is not on the cell. I'd like to give the
macro
a couple of cell locations to clear such as A2 and D45 and C13.

Thanks!

"Luke M" wrote:

ActiveCell.ClearContents
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"cvgairport" wrote:

Hi all -

Is there a line of vba code that I could put into a startup macro to
empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy






All times are GMT +1. The time now is 12:52 AM.

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