Worksheet_Change when using data validation drop down selection

Mrock1

Board Regular
Joined
Oct 7, 2014
Messages
78
I have come across a strange VBA behaviour. I have set up a worksheet_change routine that attempts to put a date in the adjacent cell and the move to another cell. The cell being changed has a data validation list of percentages. The worksheet_change uses target.offset(0,1) = date and then range(“cell address”).select to move to the other cell.

However I have found this works just fine if I manually enter a valid % in the cell but it ignores the range.select (or at least that doesn’t have any effect) if I change cell value using the DV drop down list. I also notice that my VBA breakpoints and stop commands are ignored when using the DV dropdown value selection - they are irk just fine if I manually enter a correct value.

I’m using O365.

Hope someone out there can help.

Thx
Max
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I have come across a strange VBA behaviour. I have set up a worksheet_change routine that attempts to put a date in the adjacent cell and the move to another cell. The cell being changed has a data validation list of percentages. The worksheet_change uses target.offset(0,1) = date and then range(“cell address”).select to move to the other cell.

However I have found this works just fine if I manually enter a valid % in the cell but it ignores the range.select (or at least that doesn’t have any effect) if I change cell value using the DV drop down list. I also notice that my VBA breakpoints and stop commands are ignored when using the DV dropdown value selection - they are irk just fine if I manually enter a correct value.

I’m using O365.

Hope someone out there can help.

Thx
Max
I did a test by creating a new workbook with a simple DV in A1 (1,2,3,4) and a simple worksheet_change routine with a single command range(“C2”).select

Thai works and so do breakpoints

This suggests that jus t maybe try e worksheet module has somehow become corrupt but how can recreate the worksheet and/or the VBA module?

The worksheet is far from simple and uses tables, complex formulas, filters, checkboxes and various vba worksheet events and vba macros. There are also many other equally complex worksheets for different functions.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top