View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Using multiple worksheets to keep track of changed values?

You said:

If my approach is okay, I guess I'll have to use the worksheet_changed

event
and use 'Target' to search for the cells that have been changed. Right?


In your approach, I don't see any role for Target or the change event.

--
Regards,
Tom Ogilvy


"Cybert" wrote in message
...
But Target will lose its reference every time a new event is triggered,
right?

I want users to be able to play around with the values in the worksheet,

and
then click the WRITE VALUES button to update the appropriate files with

all
of the values that changed since they were added to the sheet.

This would make it really easy for me to add a "REVERT" button, too. (It
would work even if people saved the file as a work-in-progress.)


"Tom Ogilvy" wrote in message
...
Target will hold a reference to the cell that changed/was edited that
triggered the event.

--
Regards,
Tom Ogilvy

"Cybert" wrote in message
...
I'm writing an Excel (vba) utility for a project at work and I could

use
some advice on my approach.

I have a folder with 100 .wav files. Each file has a corresponding
text-based script file with variables in it. Like this:

max_simultaneous_samples = 2;
min_playback_rate = 0.9;
max_playback_rate = 1.1;

I wrote a utility that allows users to add variable names as column
headings. When they click on a READ VALUES button my tool fills the

first
column with the appropriate filenames, and then it searches through

the
files and extracts the variables. The output looks like this:

FILENAME max_simultaneous_samples min_playback_rate
max_playback_rate
thunk.txt 2
0.9 1.1
clap.txt 2
0.8 1.2
gunshot.txt 2
0.7 1.2


I want users to be able to change those values, and then I want to

write
the
changed values back to the appropriate files. My current plan is that

when
I fill worksheet 1 with the values above, I'll add the same values to

the
same cells in worksheet 2. That way I can tell which values are the

same
and which have been changed. (I'll probably change the font color of

any
value that is different from the initial values. That way people will

have
a visual indication of their changes before they click the WRITE

VALUES
button.)

Is there a better/easier way to do this?

If my approach is okay, I guess I'll have to use the worksheet_changed

event
and use 'Target' to search for the cells that have been changed.

Right?

Thanks in advance.