Attempted to modify example from LO6.4 Base Guide pg 158 (get column value) – this is my adaptation (starting with Basic macro, using “factory reset” LO 6.4 & HSQL). [macro is executed: user puts cursor in cell & clicks on button; also Form event property “lose focus” used to pass cell value. Desire to open the string as html but – my problem is always the same, blank value returned from table, no string contents]. The subroutine executes without errors – here’s the code to get a string value from a table - that doesn’t work.
Sub GOTOURL Dim sGOTOURL As String ' no array, single value string, single column DIM oDoc AS OBJECT DIM oDrawpage AS OBJECT DIM oForm AS OBJECT DIM oTable AS OBJECT oDoc = thisComponent oDrawpage = oDoc.drawpage oForm = oDrawpage.forms.getByName("MainForm") oTable = oForm.getByName("SubFormB") ‘ The Form Navigator reports these names... ' sGOTOURL = getString("Dry”) ' column number…..14 I tried column # and column name “Dry”, zero results ' MSGBOX "GOTOURL is " + sGOTOURL ‘ In MSGBOX “sGOTOURL” value is blank ' End Sub
Hope someone notices obvious mistake(s) I made - I’m at a loss - hundreds of lines of code & 2 months clueless.