Hello to anyone willing to help me,
There's many threads on this but none that help my case (which might be simple but i'm not familiar enough with VBA to do it myself.)
I want the Macro to Unhide Rows based on two different Cells in another worksheet.
For example:
Sheet 1 E41 = 1
Sheet 1 F41 = 5
Sheet 2 Rows (x:x) Unhide
Sheet 2 Rows (y:y) Hide
To clarify i have my version (which has not been working) below.
I've tried "Dim" as Integers too and it hasn't worked.
Any help would be greatly appreciated, i have no other ideas...
There's many threads on this but none that help my case (which might be simple but i'm not familiar enough with VBA to do it myself.)
I want the Macro to Unhide Rows based on two different Cells in another worksheet.
For example:
Sheet 1 E41 = 1
Sheet 1 F41 = 5
Sheet 2 Rows (x:x) Unhide
Sheet 2 Rows (y:y) Hide
To clarify i have my version (which has not been working) below.
I've tried "Dim" as Integers too and it hasn't worked.
Any help would be greatly appreciated, i have no other ideas...
Code:
Private Sub CommandButton2_Click()
Dim i As String
Dim j As String
Dim k As String
i = ActiveSheet.Cell(E41).Value + 8
j = ActiveSheet.Cell(F41).Value + 8
k = ActiveSheet.Cell(F41).Value + 9
Worksheets("Caller 1").Rows("i:j").Hidden = False
Worksheets("Caller 1").Rows("k:38").Hidden = True
End Sub