• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

declaring variable as cell value in hidden column

theath

New Member
I am trying to declare a variable that is the text in a cell in a hidden column on the spreadsheet. This work if I move the cell to a column that is not hidden, but not when the column is hidden. Any ideas?


The value in J3 is the result of the following formula: =Table1[[#Totals],[highlight?]]>1 and results in TRUE or FALSE depending on the results of the formula.


Sub checkErrors()


Dim Errors As String

Range("J3").Select

Errors = Range("J3").Text

If Errors = "TRUE" Then

MsgBox ("Please resolve all errors in red before closing month.")

Exit Sub

End If

End Sub
 
The .Text of a cell is what is displayed. Since the cell is hidden, this is probably screwing things up (since nothing is displayed).

[pre]
Code:
Sub checkErrors()

Dim Errors As Boolean

Errors = Range("J3").Value
If Errors Then
MsgBox ("Please resolve all errors in red before closing month.")
Exit Sub
End If
End Sub
[/pre]
 
Back
Top