Hello board,
Help! I have a macro that refreshes pivot fields based on user drop down selections. This feature works great, however, if a user selects drop down combinations that do not have data sets, the macro prompts an excel alert "Do you want to replace cell contents" because the pivot expands into neighboring cells with formulas.
I want this alert to be handled within the macro, invisible to the user, where the macro automatically selects Cancel.
Upon hitting cancel, I have the code running an OnError script. My issue is having the alert set to cancel! Can this be done?
I've seen many postings for the code below which disables the alerts but the default setting is to "OK". I need it to answer "Cancel".
Application.DisplayAlerts = False
Application.DisplayAlerts = True
Any input is appreciated.
-TrojanFan
Help! I have a macro that refreshes pivot fields based on user drop down selections. This feature works great, however, if a user selects drop down combinations that do not have data sets, the macro prompts an excel alert "Do you want to replace cell contents" because the pivot expands into neighboring cells with formulas.
I want this alert to be handled within the macro, invisible to the user, where the macro automatically selects Cancel.
Upon hitting cancel, I have the code running an OnError script. My issue is having the alert set to cancel! Can this be done?
I've seen many postings for the code below which disables the alerts but the default setting is to "OK". I need it to answer "Cancel".
Application.DisplayAlerts = False
Application.DisplayAlerts = True
Any input is appreciated.
-TrojanFan