whats wrong with this?
The text string
"basedooranswer"
(which is NOT a variable) will never equal
"FLUSH HOLLOW CORE"
so the If...Then branch will never be taken.
So fixing it depends on what basedooranswer is supposed to be.
If it's supposed to be a global or module-level variable then you need
to take it out of quotes.
In article <6d90319949a93@uwe, "brownti via OfficeKB.com" <u31540@uwe
wrote:
here is what i have:
a sheet titled "new labels" and a sheet titled "builder" a checkbox on the
sheet builder is supposed to fire the macro:
Sub six_panel()
Application.ScreenUpdating = False
If ("basedooranswer") = "FLUSH HOLLOW CORE" Then
Selection.Goto reference:=("onepa_ilo_fhc")
Selection.EntireRow.Hidden = False
End If
Application.Goto reference:="six_panel"
Selection.EntireRow.Hidden = False
Sheets("builder").Select
Application.ScreenUpdating = True
End Sub
The second part of it works just fine, however it doesnt complete the first
part. "onepa_ilo_fhc" is a row on the sheet "new labels". if more info is
needed i can provide. thanks,
JE McGimpsey wrote:
What does "doesnt it work" mean to you?
If
(a) there's a workbook-level named range "onepa_ilo_fhc", or if the
named range is a worksheet-level named range and that worksheet is
active, and
(b) the variable basedooranswer = "FLUSH HOLLOW CORE"
then after the code is run, the sheet containing the referenced range
"onepa_ilo_fhc" should be active and the row(s) referenced by
"onepa_ilo_fhc" should be visible.
Works on a test workbook for me.
However, there are any number of other things that could "not work",
depending on the "other code" and a host of other factors...
this is my code inside of some other code.
[quoted text clipped - 5 lines]
why doesnt it work?
thanks
|