I have this code…
Sub cmdCSVfile_Click()
Dim fileToopen As Variant
fileToopen = Application _
.GetOpenFilename(“CSV Files (*.csv), *.csv”)
If fileToopen “” Then
Sheets(“Input”).Select
Range(“B4”).Value = fileToopen
End If
End Sub
That is on the click event of a cmd button i have on an excel worksheet i have. It opens the folder and i navigate to the proper file. Then i doubleclick on the file and get an error. I was trying to get the file name to go in the B4 cell on my input sheet. Can someone help me with what i am doing wrong. Thank you.