Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default WB before save event problem

I have a PO log workbook which has an "if" formula in Column(AB) which
enters todays date in the cell, if anything is filled in Column(R) same
row. This performms as expected. I also have a before save event which
converts the formula to a value, code below

columns("AB").value = columns("AB").value

The problem is, it wipes all my "if" formulas to values. What do I need
to change to affect only those rows where there is something entered in
Column(R) and preserve my "if" formulae. TIA

Greg

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default WB before save event problem

Hi GregR

You can't use a formula for this

You can do it with the change event of the worksheet
This example will place the date/time in the AB column if you change
a cell in the range R1:R200.

Place the code in the Sheet module

Right click on a sheet tab and choose view code
Paste the code there
Alt-Q to go back to Excel

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("R1:R200"), Target) Is Nothing Then
Target.Offset(0, 10).Value = Format(Now, "mm-dd-yy hh:mm:ss")
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"GregR" wrote in message ups.com...
I have a PO log workbook which has an "if" formula in Column(AB) which
enters todays date in the cell, if anything is filled in Column(R) same
row. This performms as expected. I also have a before save event which
converts the formula to a value, code below

columns("AB").value = columns("AB").value

The problem is, it wipes all my "if" formulas to values. What do I need
to change to affect only those rows where there is something entered in
Column(R) and preserve my "if" formulae. TIA

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default WB before save event problem

Ron, thanks for the very speedy reply.

Greg

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
After Save Event help Steph[_3_] Excel Programming 2 June 27th 05 07:00 PM
Don't save before close event? Don Wiss Excel Programming 1 September 18th 04 01:51 AM
Before Save as Event needed [email protected] Excel Programming 4 April 20th 04 07:42 PM
save as event scrabtree23 Excel Programming 1 October 5th 03 10:14 PM
After save event Bart[_3_] Excel Programming 2 July 22nd 03 12:07 PM


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

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

About Us

"It's about Microsoft Excel"