ThrottleWorks
Excel Ninja
Hi,
I am using below mentioned set codes to prompt user to select the file, and open the file user has selected.
I am not facing any issue with this code, however just wanted to know is it a safe (proper) code. Can anyone please help me in this. Will I face any problem with code in future.
PS - This is not an issue, just wanted to check if the code is correct. No urgency.
I am using below mentioned set codes to prompt user to select the file, and open the file user has selected.
I am not facing any issue with this code, however just wanted to know is it a safe (proper) code. Can anyone please help me in this. Will I face any problem with code in future.
PS - This is not an issue, just wanted to check if the code is correct. No urgency.
Code:
Sub Button_1()
Dim strPath As String
strPath = SelectFile(ThisWorkbook.Worksheets("Macro").Range("B2").Value)
ThisWorkbook.Worksheets("Macro").Range("B2").Value = strPath
End Sub
Workbooks.Open MacroSht.Range("B2").Value
Set MyBook = ActiveWorkbook