Notifications
Announcements
No record found.
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
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
The following example shows how you can call Dexterity SanScript code from VBA
winthropdc.wordpress.com/.../
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;
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader