jUStPunkin
Board Regular
- Joined
- Mar 23, 2009
- Messages
- 67
I apologize for the funky title; I wasn't sure how to word this. I have a section of code that is not working. Nothing happens. Currently, I have "Two Tier" as Y. I would expect the code to enter text in the cells specified. But nothing happens - nothing changes.
If I change that cell to N, nothing happens.
If I change it back to Y, nothing happens.
If I change that cell to N, nothing happens.
If I change it back to Y, nothing happens.
VBA Code:
Dim FeedType As Range
'Dim SlotOrHole As Range
Dim Redist As Range
Dim RDesignHead As Range
Dim DesignHead As Range
Dim RTDHead As Range
Dim TDHead As Range
Dim RTUHead As Range
Dim TUHead As Range
Dim TwoTier As Range
Set FeedType = Sheets("Input").Range("H12")
'Set SlotOrHole = Sheets("Input").Range("H19")
Set Redist = Sheets("Input").Range("H18")
Set RDesignHead = Sheets("Spouts2").Range("P3")
Set RTDHead = Sheets("Spouts2").Range("R3")
Set RTUHead = Sheets("Spouts2").Range("Q3")
Set DesignHead = Sheets("Spouts").Range("P3")
Set TDHead = Sheets("Spouts").Range("R3")
Set TUHead = Sheets("Spouts").Range("Q3")
Set TwoTier = Sheets("Input").Range("J16")
If TwoTier = "Y" Then
Sheets("Input").Range("L6") = "See Tab"
Sheets("Input").Range("L7") = "See Tab"
Sheets("Input").Range("L8") = "See Tab"
'If Two Tier is set to yes; all head heights should report the value "See Tab"
ElseIf FeedType <> "Vapor" And TwoTier = "N" And Redist = "Y" Then
Sheets("Input").Range("L6") = RDesignHead
Sheets("Input").Range("L7") = RTDHead
Sheets("Input").Range("L8") = RTUHead
'If Redistrubtion is set to yes; head heights are pulled from the spouts2 tab
ElseIf FeedType <> "Vapor" And TwoTier = "N" And Redist = "N" Then
Sheets("Input").Range("L6") = DesignHead
Sheets("Input").Range("L7") = TDHead
Sheets("Input").Range("L8") = TUHead
'If Redistribution is set to no; head heights are pulled from the spouts tab
ElseIf FeedType = Vapor Then
Sheets("Input").Range("L6") = "NA"
Sheets("Input").Range("L7") = "NA"
Sheets("Input").Range("L8") = "NA"
End If