{"id":9537,"date":"2021-12-01T17:13:25","date_gmt":"2021-12-01T17:13:25","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=9537"},"modified":"2021-12-01T17:14:21","modified_gmt":"2021-12-01T17:14:21","slug":"validatiion-drop-down-list-creates-run-time-error-in-vba","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/office\/validatiion-drop-down-list-creates-runtime-error-in-vba\/19004.html","title":{"rendered":"Validatiion Drop Down List Creates Run-Time Error In VBA"},"content":{"rendered":"<p>How do I resolve a VBA macro and cell validation conflict.<br \/>\nWe have been running the following code without any problem until we added data validation, from lists on another worksheet in the same workbook.<br \/>\nThis code worked until today:<\/p>\n<pre>Private Sub Worksheet_Change(ByVal Target As Range)\r\n If Target.Row And Target.Cells.Count = 1 Then\r\n     Range(\"Q\" &amp; Target.Row) = Date\r\n End If\r\nEnd Sub\r\n<\/pre>\n<p>Error is:<\/p>\n<pre>Run-time error '-2147417848 (80010108)'\r\nMethod '_Default' of object 'Range' failed\r\n<\/pre>\n<p>Debug identifies the following line:<\/p>\n<pre>Range(\"Q\" &amp; Target.Row) = Date\r\n<\/pre>\n<p>We are unsure how to fix this.<br \/>\nWe have Columns A to Q, changes in any row are captured in Cell Q of the same row where the change occured.<br \/>\nWe need validation in columns A, B, C, D and N wo we can better control filter and sort of values.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":4},"question-category":[53],"question_tags":[],"class_list":["post-9537","question","type-question","status-publish","hentry","question-category-office"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/9537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=9537"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=9537"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=9537"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=9537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}