Hi
Got an observation that’s puzzling me – looking for an explanation…
I’m in the middle of writing an add-in that handles connections etc. to a DB-layer.
Main part of my code is encapsulated into a class module ‘clsDB’.
To have the functions visible from outside the ad-in, I’ve added a ‘module-layer’ with ‘public subs’, s that calls to the clsDB goes through the module layer,
…but – if I’m not passing parameters to the sub – it is visible in ‘Tools’ -> ‘Macro’ -> ‘Macros’ (example below)
Public Sub GetShareHolders()
Dim oDB As clsDB
Set oDB = New clsDB
oDB.Connect
oDB.GetMajorShareholders oDB
Set oDB = Nothing
End Sub
…and – if I do pass parameters – it is no longer visible… – wondering why???
Public Sub GetShareHolders(ByVal strSource As String, ByVal strTicker As String)
Dim oDB As clsDB
Set oDB = New clsDB
oDB.Connect
oDB.GetMajorShareholders oDB, strSource, strTicker
Set oDB = Nothing
End Sub