'How to limit range of columns from a table with VBA and Access in a select case structure

I have the code below and I need to import the data from a table in the range of "A:K".

Function ImportExport(ByVal template As String) As Boolean

    Dim Name As String
    Dim Code As String
    Dim table As String
    Dim Sheet As String
    
    If Dir(CurrentProject.Path & "\Folder1\*" & template & "*") = "" Then ImportExport = True
        Else
    Name = Dir(CurrentProject.Path & "\Folder1\*" & template & "*")
            
     Select Case template
                Case “Reality
                Code = “Try1”
                table = “secondTable"
                
                'Sheet = Sheets("Table_needs!”).Range("A:K")
                Sheet = "Table_needs!"

What I need is sth like it:

Sheet = Sheets("Table_needs!”).Range("A:K")

But it doesn't work in this structure. can anyone help?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source