Hi, I'm new to VBA, but for a project I'm working on, the calculations require a series of formulas such as goal seeks etc. I have enabled them such that the relevant macros are run when a value changes to a non-zero value. Examples of these;
Sheet 1:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim found As Boolean
found = False
For Each cell In Range("AH106", "AH107").Cells
If cell.Value = "X" Then
found = True
End If
Next
If found = True Then
Call GoalSeek_T113
Else
Call GoalSeek_T113
End If
End Sub
Where the Macro is something along the lines of
Macro 1
Sub GoalSeek_T113()
Range("AH106").GoalSeek Goal:=0, ChangingCell:=Range("AL108")
Range("AH107").GoalSeek Goal:=0, ChangingCell:=Range("AK108")
End Sub
All of the formulas for the work sheet events and macros run fine, however because there are multiple sheets in my document, the problem is that when I click anywhere on the current sheet e.g. Sheet 1 that is when the macro designated by the sheet runs but if I was clicked on another page, the macro will not be run until I click back to Sheet 1. This is a problem as it means I still need to click through several sheets in a sequence. Is there any way to have the formula run when the value changes, regardless if I am clicked on the sheet or not?
Kind Regards
Bookmarks