I have a problem with using cells as range parameters. I am using a workbook from a different excel file that i imported like this :
FileLocation = Application.GetOpenFilename
If FileLocation = "False" Then
Beep
Exit Sub
End If
Application.ScreenUpdating = False
Set Importworkbook = Workbooks.Open(Filename:=FileLocation)
And i'm trying to select some cells from a worksheet in this workbook :
Public Sub selection()
Debug.Print (Importworkbook.Name)
Importworkbook.Activate
Importworkbook.Worksheets(4).Range(Cells(1, 6), Cells(1, 9)).Select
End Sub
But the selection line doesnt work and i don't understand why (I am fairly new to vba so sorry if there's horrible coding )