jeffreybrown
Well-known Member
- Joined
- Jul 28, 2004
- Messages
- 5,152
I need to establish a sheet as global and some ranges, but this method is not working. I get a debug on the first If statement under the Sub Test.
Any thoughts on making it work?
Any thoughts on making it work?
Code:
Option Explicit
Public Const SrcRng1 = "A1"
Public Const SrcRng2 = "A2"
Code:
Public Property Get ModelWorksheet() As Worksheet
Const cfgSheet As String = "Sheet2"
Set ModelWorksheet = ActiveWorkbook.Worksheets(cfgSheet)
End Property
Code:
Sub Test()
If ModelWorksheet(Range(SrcRng1)) Then
MsgBox True
Else
MsgBox False
End If
End Sub