You should probably ask VBA question on a Visual Basic board. While someone here may be familiar with VB code the topics are intended to be SAS related.
If you are using SAS at all I would ask why bother to do graphs in VB as the SAS software has a LOT of graphic capability.
Catch up on SAS Innovate 2026
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.