Retrieve the value of a variable in VBA and put it in a cell in Excel

0

I have a variable (a name) declared in VBA how do I retrieve this name to put in a cell of an Excel spreadsheet (if possible via a formula) Thanks

    
asked by anonymous 03.10.2018 / 20:12

1 answer

0

The value of a variable is destroyed after the execution of a function. To save the value it is necessary to allocate this value somewhere like for example in a cell while the code is still running.

Range("A1").Value = variavel
    
23.11.2018 / 13:08