I want to write code for picking a default folder where the data file to be imported is stored. This default path is stored in, say, Cell B1. Another similar path for another data file is stored in, say, cell B3. I have written the code for displaying a browse window for picking up the folder as under -

Sub OpenFolder()
Dim fPath As String

    With Application.FileDialog(msoFileDialogFolderPicker)
        .AllowMultiSelect = False
        .Show
        If .SelectedItems.Count > 0 Then
           fPath = .SelectedItems(1) & "\"
        Else
           End
        End If
    End With
    
End Sub
Now the help I need is to suggest a code so that when a user mouse clicks on cell B1, the above code is executed and the returned value is stored in Cell B1 and when he clicks on cell B3, the above code is executed and the returned value be stored in cell B3.

It will still be better if the mouse click and an 'Enter' key both can be identified to execute the above code.