Passing Variables to VBA CODE

Continuing the discussion from How to put variables into the function with "invoke VBA"?:

Continuing the discussion from How to put variables into the function with "invoke VBA"?:

Hi ,
I am passing parameters as a variables instead of HardCode, i see the error as Parameter not optional. Please find the below screen shots for details . kindly help me


Shows error as below

Remove the .show

also you shouldnt need brackets around your strings:

image

3 Likes

Hi Balchandra,

Thanks for the help.its working, need to be relaxed and think upon.
great, thanks for quick reply.