Easy code, confounded by error
wrote:
I keep getting a "Method 'Range' of 'object _Global' failed"
error. Here is the code:
Dim temp As String
temp = Range("statusBarMsg").Value2
What can I be missing here?
With Name Manager, take a close look at how statusBarMsg is defined, if at
all. I wonder if the scope is a specific worksheet, not workbook, and when
you execute the line above, ActiveSheet is not worksheet scope defined for
statusBarMsg.
Alternatively, put the following in place of the code above and execute
(just for diagnostic purposes):
Dim nm
For Each nm In ActiveWorkbook.Names
If InStr(nm.Name, "statusBarMsg") Then MsgBox nm.Name
Next
|