Greetings, you are very right
I did not try much. The code became confusing to me, and I have already lost several files for misinterpreting the codes. I've been used to seeing and using it like this:
HTML Code:
''ListBox1.RowSource = "'" & GENTEST.Sheets("Hoja5").Name & "'!A1:B" & wbLibroOrigen.Sheets("Hoja5").Range("A" & Rows.Count).End(xlUp).Row
... and, In the provided code I do not distinguish from where to where it loads the listbox..
But I understood I passed the Function to a module and it was not the name of the sheet, but the Listbox .... sorry!
with these fixes ..
It works!!! Great, and the Excel file no longer becomes Read Only ...
I am really very grateful !!