Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Clear contents of row but preserve formulas?

Hi Everybody,

In Excel 97 I'm using vba and the Object Model to copy a row and insert its
copy elsewhere. My problem is that with the newly inserted row I'd like to
clear the entire rows values that were copied over, but preserve the
formulas the row contains. I have only found the Range.Clear method which
doesn't preserve the formulas?

Does anybody know what syntax I would use instead?

Thanks for any help!
Sam


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Clear contents of row but preserve formulas?

Hi Sam,

Use the macro recorder with EditGoto, Special, Constants, EditClear,
Contents

That will give you the basis for the code, which of course can be simplified

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"debartsa" wrote in message
...
Hi Everybody,

In Excel 97 I'm using vba and the Object Model to copy a row and insert

its
copy elsewhere. My problem is that with the newly inserted row I'd like to
clear the entire rows values that were copied over, but preserve the
formulas the row contains. I have only found the Range.Clear method which
doesn't preserve the formulas?

Does anybody know what syntax I would use instead?

Thanks for any help!
Sam




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Clear contents of row but preserve formulas?

Thanks for the reply Niek!

Unfortunately Excel 97 doesn't structure it's Edit menu that way... I'll try
to find if that feature even exists in '97

Thanks
Sam



"Niek Otten" wrote in message
...
Hi Sam,

Use the macro recorder with EditGoto, Special, Constants, EditClear,
Contents

That will give you the basis for the code, which of course can be

simplified

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"debartsa" wrote in message
...
Hi Everybody,

In Excel 97 I'm using vba and the Object Model to copy a row and insert

its
copy elsewhere. My problem is that with the newly inserted row I'd like

to
clear the entire rows values that were copied over, but preserve the
formulas the row contains. I have only found the Range.Clear method

which
doesn't preserve the formulas?

Does anybody know what syntax I would use instead?

Thanks for any help!
Sam






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Clear contents of row but preserve formulas?

activeCell.EntireRow.Specialcells(xlConstants).Cle ar

--
Regards,
Tom Ogilvy

"debartsa" wrote in message
...
Thanks for the reply Niek!

Unfortunately Excel 97 doesn't structure it's Edit menu that way... I'll

try
to find if that feature even exists in '97

Thanks
Sam



"Niek Otten" wrote in message
...
Hi Sam,

Use the macro recorder with EditGoto, Special, Constants, EditClear,
Contents

That will give you the basis for the code, which of course can be

simplified

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"debartsa" wrote in message
...
Hi Everybody,

In Excel 97 I'm using vba and the Object Model to copy a row and

insert
its
copy elsewhere. My problem is that with the newly inserted row I'd

like
to
clear the entire rows values that were copied over, but preserve the
formulas the row contains. I have only found the Range.Clear method

which
doesn't preserve the formulas?

Does anybody know what syntax I would use instead?

Thanks for any help!
Sam








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
How can I higlight and clear contents but not formulas AMANDA Excel Discussion (Misc queries) 1 July 6th 09 05:10 PM
Clear contents, keep formulas billinr Excel Discussion (Misc queries) 2 October 25th 07 02:51 PM
How do I clear contents from a spreadsheet but not the formulas Roberto Excel Discussion (Misc queries) 1 January 4th 07 05:08 PM
How do I clear contents in my workbook w/o loosing my formulas? Julie E Excel Worksheet Functions 4 December 29th 06 07:56 PM
Clear contents but leave formulas in Excel ojchippy New Users to Excel 10 June 16th 06 11:05 PM


All times are GMT +1. The time now is 06:30 PM.

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

About Us

"It's about Microsoft Excel"