Property let optional args


Author: Dave
Date: 03.25.16 - 6:12pm



Ok I never knew this worked..it looks bizzare but works fine in vb6. Handy..
Property Get sValue(Optional m As modes = mHex) As String
        'do stuff
end property

Property Let sValue(Optional m As modes = mHex, ByVal s As String)
        'do stuff
end property

x.sValue = "1234"
x.sValue(mHex) = "1234"
msgbox x.sValue
msgbox x.sValue(mHex)





Comments: (0)

 
Leave Comment:
Name:
Email: (not shown)
Message: (Required)
Math Question: 26 + 95 = ? followed by the letter: E 



About Me
More Blogs
Main Site
Posts: (All)
2024 ( 3 )
2023 ( 9 )
2022 ( 4 )
2021 ( 2 )
2020 ( 4 )
2019 ( 5 )
2018 ( 6 )
2017 ( 6 )
2016 (22)
     VB6 CDECL
     UDT Tricks pt2
     Remote Data Extraction
     Collection Extender
     VB6 FindResource
     CDO.Message
     DirList Single Click
     Reset CheckPoint VPN Policy
     VB6 BSTR Oddities Explained
     SafeArrays in C
     BSTR and Variant in C++
     Property let optional args
     Misc Libs
     Enum Named Pipes
     Vb6 Collection in C++
     VB6 Overloaded Methods
     EXPORT FUNCDNAME Warning
     VB6 Syncronous Socket
     Simple IPC
     VB6 Auto Resize Form Elements
     Mach3 Automation
     Exit For in While
2015 ( 15 )
2014 ( 25 )
2013 ( 4 )
2012 ( 10 )
2011 ( 7 )
2010 ( 11 )
2009 ( 3 )