Hi,
I need a vba button code which when clicked will change cells S4 and S5 to value -1, regardless of the value already in these cells.
The issue I am having is that sometimes S5 is locked (which is determined by cell A1 being TRUE instead of FALSE).
What I need the button to do is first check whether cell A1 says TRUE, if it is then change only cell S4 to -1. If cell A1 says FALSE, then change both cells S4 and S5 to -1.
This new line of code is going right at the end of an existing code which ultimately saves the sheet as a PDF, so I want this new line of code to occur right at the end as a final instruction, after the PDF save.
Thanks in advance.
I need a vba button code which when clicked will change cells S4 and S5 to value -1, regardless of the value already in these cells.
The issue I am having is that sometimes S5 is locked (which is determined by cell A1 being TRUE instead of FALSE).
What I need the button to do is first check whether cell A1 says TRUE, if it is then change only cell S4 to -1. If cell A1 says FALSE, then change both cells S4 and S5 to -1.
This new line of code is going right at the end of an existing code which ultimately saves the sheet as a PDF, so I want this new line of code to occur right at the end as a final instruction, after the PDF save.
Thanks in advance.