A possible path would be to set the entity name of the two cylinder faces. Right click on the cylinder face then click face properties to add a name.
Get an entity by name: 2013 SOLIDWORKS API Help - GetEntityName Method (IModelDoc2)
Try this code:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFace As SldWorks.Face2
Dim i As Long
Dim bRet As Boolean
Dim swSurf As Surface
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swFace = swSelMgr.GetSelectedObject5(1)
Set swSurf = swFace.GetSurface
If swSurf.IsCylinder Then
bRet = swFace.FaceInSurfaceSense
If bRet = True Then swApp.SendMsgToUser "Cylindrical surface is hole"
If bRet = False Then swApp.SendMsgToUser "Cylindrical surface is not hole"
I haven't tested this but it should work.
The method you provide is worked and executed successfully.
The FaceInSurfaceSense method's detailed description is in the link
I'm glad that you solve my problem.
Thank you very much.