ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto Change sheet value (https://www.excelbanter.com/excel-programming/369008-auto-change-sheet-value.html)

Brian Matlack[_118_]

Auto Change sheet value
 

Hi again!
Apparently selecting a date from a data validation list does not
trigger a Private Sub Worksheet_Change(ByVal Target As Excel.Range).

How can I accomplish this? I would like for the code to run when the
user selects the new date from the data validation list.

I could just put a button for the user to click after changing the date
but I wanted to ask anyway.

Thanks!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=567100


Dave Peterson

Auto Change sheet value
 
This problem was fixed in xl2k (xl97 still suffers from the problem).

How about putting a button near the cell with data|validation that will invoke
the macro.

Or dump the data|validation completely and use either a dropdown from the Forms
toolbar or a combobox from the Control toolbox toolbar.

Brian Matlack wrote:

Hi again!
Apparently selecting a date from a data validation list does not
trigger a Private Sub Worksheet_Change(ByVal Target As Excel.Range).

How can I accomplish this? I would like for the code to run when the
user selects the new date from the data validation list.

I could just put a button for the user to click after changing the date
but I wanted to ask anyway.

Thanks!!

--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=567100


--

Dave Peterson

Brian Matlack[_119_]

Auto Change sheet value
 

Thanks Dave!!
I have a workbook that I create and keep examples in and this code doe
not work in it.

However! When I put the code into my users workbook it works fine.????

I must have a problem in the Example workbook. There are 30 or 40 cod
examples in it and maybe one of them sets a criterion that fowls-u
this one. I'll keep looking!

Thanks again for your time and help!!

--
Brian Matlac
-----------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350
View this thread: http://www.excelforum.com/showthread.php?threadid=56710


Dave Peterson

Auto Change sheet value
 
Are all the workbooks running the same version of excel--if yes, what version?

And when you're snooping, make sure you look to see that you enableevents after
you've disabled them.

Brian Matlack wrote:

Thanks Dave!!
I have a workbook that I create and keep examples in and this code does
not work in it.

However! When I put the code into my users workbook it works fine.????

I must have a problem in the Example workbook. There are 30 or 40 code
examples in it and maybe one of them sets a criterion that fowls-up
this one. I'll keep looking!

Thanks again for your time and help!!!

--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=567100


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com