By using vba.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

948 Steps to 6 Figures by Learning Excel-VBA and Other Skills



Step 779 - ByVal


ByVal is for data passed to subroutines or functions.

There are 2 ways to pass parameters, ByVal or ByRef.

ByRef is the default.

The big difference between the two methods is that ByRef if the subroutine or function modifies the parameter the calling routine might not work properly.

It's safer to Call by value as a copy of the value is passed to the routine.

ByRef is similar to a Global or Public variable.

   Table of Contents | Send us your feedback | © 2025 All Rights Reserved | Edit