Is there a guide that will help in translating VBA codes in PI AF?
Assuming that PI AF means AF SDK, there are 2 translations / conversions / migrations you would be concerned about. This is because VBA uses PI SDK in unmanaged COM with PI SDK, where as AF SDK uses managed .NET Framework, where C# and VB.NET are two supported .NET languages for AF SDK.
Thus you would need to be concerned with:
AF SDK Equivalents for DataLink Functions (reference-only for PI SDK)
The above has a chart with DataLink, PI SDK, and AF SDK equivalents
CSharp Cheat Sheet for VB.NET Developers
Many PI Square and GitHub examples only show C#, so the above helps you translate into VB.NET.
Help on migrating from VBA to VB.NET would best be found at Microsoft or other forums. I would encourage you to focus on becoming a .NET Developer who happens to use VB.NET, rather than being a VB coder. A .NET Developer would focus on using standard calls in the .NET Framework, whereas a VB coder would rely on the Microsoft.VisualBasic namespace to cling to legacy calls like CStr or MsgBox. Microsoft may or may not have the guide you are looking for, but nothing will teach you better than actually doing. My strongest advice, however, is NOT to do a line-by-line translation as that is the fastest path to failure. VB.NET and VBA are so different, and there are so many convenient features baked into .NET, that a better migration should be to step back and look at the big picture of what an application or subroutine is doing, and then code it efficiently in VB.NET.
Retrieving data ...