Announcements
Hi,
I am trying to get value of selected node of TreeView in VBA on Select In-Transit Items window.
I have added TreeView control field in VBA and when I tried to get Value, It always returns empty. How can I get that selected value?
See below screenshot.
Thanks,
Atul
The following example shows how you can call Dexterity SanScript code from VBA
Here is some example code:
local long node_ID;
local string node_label;
{Get the ID of the selected node.}
node_ID = TreeView_GetSelectedNode('TreeView' of window WindowName of form FormName);
if node_ID <> TV_NODEINVALID then
{Get the node label.}
node_label = TreeView_GetNodeLabel('TreeView' of window WindowName of form FormName, node_ID);
else
warning "No item is selected in the Address List field.";
end if;
Hi Autel
The only method that will work from VBA is pass through sanScript and using the Dexterity commands.
I would recommend that you move away from VBA which is "End of Life" and does not work on the web client and Windows Servers.
Instead you should look to the alternatives, Dexterity, Visual Studio Tools or better still GP Power Tools which is a perfect replacement for VBA as well as offering many other must have features.
See: https://winthropdc.wordpress.com/2019/08/12/gppt-replacing-vba-with-gp-power-tools-developer-tools/
Also see the Benefits Presentation: https://www.winthropdc.com/ftp/pub/GPPowerTools_Benefits.ppsx
David
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156