Hello.
A sheet called “MemberData” is where all information is input and it is also where my graph displays. Information input into the Memberdata sheet is fed to a table in a sheet called “CoverageandRatescalculation”. The only sheet that will be visible to the end user is the MemberData sheet.
Each time updated information is input into the MemberData sheet I need to go to the CoverageandRatescalculation sheet to press an ActiveX control button that runs two macros. One macro resets the table and the other updates the table. The macros work perfectly when run from the CoverageandRatescalculation sheet.
Try as I might I can’t find a way to run the macros that update the CoverageandRatescalculation sheet directly from the MemberData sheet. Any assistance would be greatly appreciated.
Here are the macros that will only work when run from the CoverageandRatescalculation sheet.
First macro
And the second Macro is
And here is the Macro for the Command Button located in the CoverageandRatescalculation sheet. All macros only work when run from the CoverageandRatescalculation sheet.
A sheet called “MemberData” is where all information is input and it is also where my graph displays. Information input into the Memberdata sheet is fed to a table in a sheet called “CoverageandRatescalculation”. The only sheet that will be visible to the end user is the MemberData sheet.
Each time updated information is input into the MemberData sheet I need to go to the CoverageandRatescalculation sheet to press an ActiveX control button that runs two macros. One macro resets the table and the other updates the table. The macros work perfectly when run from the CoverageandRatescalculation sheet.
Try as I might I can’t find a way to run the macros that update the CoverageandRatescalculation sheet directly from the MemberData sheet. Any assistance would be greatly appreciated.
Here are the macros that will only work when run from the CoverageandRatescalculation sheet.
First macro
VBA Code:
Sub HideRows()
StartRow = 32
EndRow = 114
ColNum = 1
For i = StartRow To EndRow
If Cells(i, ColNum).Value = "0" Then
Cells(i, ColNum).EntireRow.Hidden = True
Else
Cells(i, ColNum).EntireRow.Hidden = False
End If
Next i
End Sub
And the second Macro is
VBA Code:
Sub HideRows_based_On_Values()
For Each cell In Range("A32:A120, H32:H120")
If cell.Value = 0 Then cell.EntireRow.Hidden = True
Next cell
End Sub
And here is the Macro for the Command Button located in the CoverageandRatescalculation sheet. All macros only work when run from the CoverageandRatescalculation sheet.
VBA Code:
Private Sub CommandButton1_Click()
HideRows
HideRows_based_On_Values
End Sub
Last edited by a moderator: