Variable workbook: the index does not belong to the selection
Solved
Mouftie
Posted messages
234
Status
Membre
-
moise -
moise -
Hello,
Hello,
I would like to work on files whose names are found in a table (TbFic)
I wrote:
I have an error message "The index does not belong to the selection."
Note: cell B4 is in the form "NomFichier.xlsm"
Can you help me, please? Thank you
Configuration: Windows / Firefox 38.0
Hello,
I would like to work on files whose names are found in a table (TbFic)
I wrote:
Sub test()
Dim Fc As String, WbFc As Workbook
Fc = Sheets("Données").Range("B4").Value
Set WbFc = Workbooks(Fc)
WbFc.Activate
End Sub
I have an error message "The index does not belong to the selection."
Note: cell B4 is in the form "NomFichier.xlsm"
Can you help me, please? Thank you
Configuration: Windows / Firefox 38.0
Thank you for your intervention and for creating an xlsx file.