Unable to view variable
You may have more than one workbook opened. See if this helps
Sub SetVarFromCell()
Dim paycode12 As Long
MsgBox (ThisWorkbook.Name & " " & ActiveSheet.Name & " " &
ActiveCell.Address)
MsgBox (ActiveCell.Value)
with Thisworkbook
paycode12 = .Worksheets("flx00012.tmp").Cells(18, "L").Value
end with
MsgBox (paycode12)
End Sub
"KevinM" wrote:
I'm unable to get the value stored in the variable. I'm not sure what I'm
doing wrong. I get a value of zero. Here's what I'm doing to check the
value of the data:
Sub SetVarFromCell()
Dim paycode12 As Long
MsgBox (ThisWorkbook.Name & " " & ActiveSheet.Name & " " &
ActiveCell.Address)
MsgBox (ActiveCell.Value)
paycode12 = Worksheets("flx00012.tmp").Cells(18, "L").Value
MsgBox (paycode12)
End Sub
Any help is appreciated.
|