Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
john tempest
 
Posts: n/a
Default delete some cell formulas and leave others using code

i have the following code which removes al ceel formulas and saves the sheet.
i would like to leave some of the formulas active but not all
can anybody help
thankyou john tempest
Private Sub CommandButton1_Click()
Dim wkbk As Workbook, sh As Worksheet
Worksheets("MANUAL TS").Copy
Set wkbk = ActiveWorkbook
' get rid of all cell formulas
For Each sh In wkbk.Worksheets
With sh.UsedRange
.Value = .Value
'getrid of command button'
ActiveSheet.OLEObjects("CommandButton1").Delete
End With
Next
wkbk.SaveAs "C:\Documents and Settings\Administrator\My
Documents\HOWDENS\TIMESHEET\ " & Sheets("MANUAL TS").Range("B5") & ".xls"
wkbk.Close
End Sub
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
Excel should allow delete cell's value but leave formula alone. MrQuick Excel Discussion (Misc queries) 7 January 25th 06 10:28 PM
copy and pasting a find all list into another column Ben Excel Discussion (Misc queries) 18 December 31st 05 10:51 PM
highlight/color cells with specific character inside markx Excel Worksheet Functions 6 October 20th 05 10:19 AM
How do I clear a worksheet of values, but leave formulas intact? [email protected] Excel Worksheet Functions 2 April 18th 05 05:53 PM
Relative Macro Help on Keystrokes Neal Zimm Excel Discussion (Misc queries) 9 December 15th 04 12:31 AM


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

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"