Procedure
Close the connection to the R/3 system and release the resources. To do this, enter these lines:
'Close connection to R/3 !
'
functionCtrl.Connection.logoff
'
'Release the objects to free storage space
'
Set sapConnection = Nothing
Set functionCtrl = Nothing
MsgBox "Program terminated!", 16, "Exit"
Check the Result

After logon, the system executes function module RFC_CUSTOMER_GET and displays the R/3 customer data on the active EXCEL worksheet:

To continue processing the customer data, you can store the EXCEL worksheet locally.