I see one of the statements word-wrapped. Here is the same code again, but
using a line continuation to make sure the statement doesn't word-wrap....
'****************** Start Of Code ******************
Private Declare Function EnumDisplayMonitors Lib "user32.dll" _
(ByVal hdc As Long, ByRef lprcClip As Any, _
ByVal lpfnEnum As Long, ByVal dwData As Long) As Long
Private MonitorCount As Long
Public Function NumberOfMonitors()
MonitorCount = 0
EnumDisplayMonitors ByVal 0&, ByVal 0&, AddressOf _
MonitorEnumProc, ByVal 0&
NumberOfMonitors = MonitorCount
End Function
Private Function MonitorEnumProc()
MonitorCount = MonitorCount + 1
MonitorEnumProc = 1
End Function
'****************** End Of Code ******************