Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Data
I have triied to use the following code to save entered data. Howeve
it also deletes all the formulas in cells not used yet. I'm triing t save data as it is entered. Once the data is entered the formula i not need for that cell. However, future data is depended on th formula in other cells not used yet. ?????? Sheet2.Activate Set rng = Range("A3:E366") If rng 0 Then rng.Formula = rng.Value Else rng.Formula = rng.Formula End If Thank you again -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Data
You could try Activesheet.Save....i'm pretty new to this so dont kno
how it would work but for it to work when a change is made on a shee it would have to e in Private Sub Worksheet_sheetselection_change. HTH SImo -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Data
ceplane
Sheets("Sheet6").Activate Set rng = Range("A3:E366") For Each rcel In rng If rcel.Value 0 Then rcel.Formula = rcel.Value Else rcel.Formula = rcel.Formula End If Next rcel Gord Dibben Excel MVP On Mon, 10 May 2004 14:10:24 -0500, ceplane wrote: I have triied to use the following code to save entered data. However it also deletes all the formulas in cells not used yet. I'm triing to save data as it is entered. Once the data is entered the formula is not need for that cell. However, future data is depended on the formula in other cells not used yet. ?????? Sheet2.Activate Set rng = Range("A3:E366") If rng 0 Then rng.Formula = rng.Value Else rng.Formula = rng.Formula End If Thank you again. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Data
Thank you for the ideas.
But, she hangs up on If rcel.Value 0 Then Doesn't look much different then what I triied before. Sounds simple I can't get it to work. The active sheet save didn't work either. ????? -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Data
What is "hangs up"?
Looks much different from your original code and changes formulas to values if they return something. Leaves formulas as is if they return nothing. As far as saving the Activesheet, I don't see that anywhere in your original code. Here is a simple Macro for saving the active worksheet with the sheet name as the file name. Sub SaveSheet() ActiveSheet.Copy ActiveWorkbook.SaveAs Filename:=ActiveSheet.Name, _ FileFormat:=xlNormal End Sub Gord On Mon, 10 May 2004 20:33:49 -0500, ceplane wrote: Thank you for the ideas. But, she hangs up on If rcel.Value 0 Then Doesn't look much different then what I triied before. Sounds simple I can't get it to work. The active sheet save didn't work either. ?????? --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Data
Gord,
When the program runs, I get an error message "Runtime Error 13 Typ mismatch" and this line is highlighted. If rcel.Value 0 Then I don't know if it is the cell format that is causing the problem o not. Thanks for your support. Ric -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving data | Excel Discussion (Misc queries) | |||
Saving data | Excel Discussion (Misc queries) | |||
saving data? | Excel Discussion (Misc queries) | |||
Saving data | New Users to Excel | |||
Saving Data | Excel Discussion (Misc queries) |