silverfang
New Member
- Joined
- Mar 19, 2020
- Messages
- 11
- Office Version
- 2016
- 2010
- Platform
- Windows
I have a working code, but it doesn't hide until i Run the code from VB Editor :
Maybe those D3,D4 and D5 are formulated , that's why it is not running on its own :
The above code isto run the formula in cells in CheckList sheet so that they take in values from the drop down list.
This code hides only one option from the drop down Sheet "FSSAI WS", but then other ones are not responding until and unless i press the RUN option in VB Editor.
Can someone please help me out......!!!
Maybe those D3,D4 and D5 are formulated , that's why it is not running on its own :
The above code isto run the formula in cells in CheckList sheet so that they take in values from the drop down list.
This code hides only one option from the drop down Sheet "FSSAI WS", but then other ones are not responding until and unless i press the RUN option in VB Editor.
Can someone please help me out......!!!
VBA Code:
Sub Formula_Property()
Range("D3").Formula = "='FSSAI WS'!D13"
Range("D4").Formula = "='FSSAI WS'!F13"
Range("D5").Formula = "='FSSAI WS'!D15"
End Sub
------------------------------------------------------------------------------------------------------------------------
Private Sub Worksheet_Calculate()
'Application.ScreenUpdating = False
Application.EnableEvents = False
Dim business As Range
Set business = Sheets("Checklist").Range("D4")
Select Case business
Case Is = "Manufacturer": Rows("10:14").EntireRow.Hidden = True
Case Is = "Trader": Rows("16:18").EntireRow.Hidden = True
Case Is = "Relabeller & Repackers": Rows("20:25").EntireRow.Hidden = True
Case Is = "--": Rows("10:30").EntireRow.Hidden = False
'Application.ScreenUpdating = True
Application.EnableEvents = True
End Select
End Sub