ThrottleWorks
Excel Ninja
Hi,
I hardly use functions in my coding. However I want to learn how to write functions and call from module.
Can anyone please share links which will help me understanding functions. Thanks.
Please see below example for your reference.
I hardly use functions in my coding. However I want to learn how to write functions and call from module.
Can anyone please share links which will help me understanding functions. Thanks.
Please see below example for your reference.
Code:
Sub File_Select()
Call FilePicker(Sheet1.TextBox1)
End Sub
Sub FilePicker(ByRef txt As Object)
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Show
If .SelectedItems.Count > 0 Then txt.Value = .SelectedItems(1)
End With
End Sub
Last edited by a moderator: