PDA

View Full Version : Content in a range is not clearing when i using F5 key



syed_iqbal
04-04-2017, 07:10 PM
Hi,


Below 2 lines of code is working when I run step by step (by using F8). But the code is not working properly when I use "F5".

Workbooks("Team Update - Copy.xlsm").Sheets("TS").Range(Cells(2, 13), Cells(1000, 23)).Select
Selection.ClearContents

Explanation: Each time, code has to delete the contents from range M2 to W1000 in "TS" Sheet.But When using F5 key, code is not deleting the content.

Note: Pls go through the Code and pls run the code at least 2 to 3 times. If run the code 2 times by using F5 key then the second time you can observe the problem at WSheets("TS").Range("M2")


thank you in advance


regards
iqbal

rlv
04-05-2017, 12:37 PM
Cross post?

https://www.excelforum.com/excel-programming-vba-macros/1180306-content-in-a-range-is-not-clearing-when-i-use-f5-key.html