Hi!

So did a little internet searching and made this code.

Dim sFilename As String

sFilename = Application.GetOpenFilename
ChDir "U:\Skupno\Eureka Pumps AS"
If sFilename <> "" Then
    Workbooks.Open sFilename
End If
Works great.
But my problem here is I want to contiue on with:
Dim x As Range
For Each x In (Missing The Opened Workbook Name).Range("F8:F400")
And so on with my code
So my question is how can I get the name of the workbook that I open.
If I use MsgBox sFilename <---- then it gives me the U:\Full\Path\Filename.xlsm But all I need is Filename and since the path is different for each file I cant just Trim the path away
It works If I use ActiveWorkbook.Name but since I don't want the workbook I open to be activated I want to somehow use the name to define the range.

Can some one help me with this please?