Hello,
I share a lot of generic code between my projects I load a module and it "speaks" immediately with other modules, enum's and type's...
sometimes some specific module/enum/type is not on the workbook and I need to comment out a lots of line of code, so I thought to use some kind of public const as a "swich - On/Off" with VBA7, but its not working...
I want to do somthing like that, any idea ?
I share a lot of generic code between my projects I load a module and it "speaks" immediately with other modules, enum's and type's...
sometimes some specific module/enum/type is not on the workbook and I need to comment out a lots of line of code, so I thought to use some kind of public const as a "swich - On/Off" with VBA7, but its not working...
I want to do somthing like that, any idea ?
Code:
Public Const IsTechniqueOne As Boolean = True
Sub TestSub()
[URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=If"]#If[/URL] IsTechniqueOne Then
'do somthing with module a, b and c
'module x,y,z is not on the workbook
'use Enum and type - d,e,f
'enum and type - g,h,i is not on the workbook
[URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=Else"]#Else[/URL]
'do somthing with module x, y and z
'module a,b,c is not on the workbook
'use Enum and type - g,h,i
'enum and type - d,e,f is not on the workbook
[URL="https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=End"]#End[/URL] If
End Sub
Last edited: