Reassigning a dynamic URL for a form's push button

using LO Version: 5.0.1.2 on iMac with OSX10.10.5

I’m developing a multi-platform application which I’m attempting to be OS and file system independent.
I have a help button on each of my forms to which I’ve assigned a Action (rather than use one of the events or the HELP URL) Open document/web page and have supplied a URL pointing to a HTML file of my help pages .

However the URL only works for my system. I need for it to be dynamic and to be able re-assign it when the application is running on a users system. I’ll have my help web pages stored offline in a pre-known user application support directory.

[As an aside I’ve tried using the HELP URL on the button’s control panel but cannot get it to work even after following all the instructions about installing a help pack and using [SHIFT]-[F1]. Anyway I don’t want my users to have to have the hassle of doing all that]

My question is simply what is the BASE
macro code to allow me to change the
URL in this instance.

My idea is that when the user installs the application it will conduct a one off re-assignment of all the help buttons on all the forms. FYI I’ve tried XRAYing the form object to track down things but XRAY doesn’t seem to work with LO v5

I have solved my problem!

I made use of the WriteDbgInfo in the Tools.Debug module to examine the helpButton.

I now have an identical help button on all my forms on which the targetURL is created
when the form is loaded this calls a form initialisation routine that in turn calls this help setup routine.

public sub setHelp(frm as object, ofrm as object, HelpNo as integer)
' frm is created in the calling routine the initialises the form
' ofrm is the argument that's passed on the form loading 
'    that calls the initialisation routine
' HelpNo is the swticboard Key used to get the Hel HTML file
' HelpDir is created in getReferences routine & is dependent on the OS
'    it points to the application support directory. 
dim helpHtmlFile	as string
dim oBtn			as object

'make the form's the help button visible or not
	frm.Controls("HelpButton").visible=HelpSwitch
	if HelpSwitch then
' get the help html file
		helpHtmlFile=dlookup("[helpHtml]","[SwitchBoard Items]","[switchboardKey]=" & cstr(HelpNo))
		if isNull(helpHtmlFile) then helpHtmlFile="WelcometotheSecretaryBird"
		helpHtmlFile=HelpDir & 	helpHtmlFile & ".html"
	    oBtn = ofrm.source.getByName("HelpButton")
        obtn.targetURL=helpHtmlFile       
     endif
end sub