Answer the question
In order to leave comments, you need to log in
Why does subscript out of range give error?
Why is it giving an error Why is it giving a subscript out of range error?
in all the line where is ActiveWorkbook.Worksheets(List).Cells(k, 2
)
Answer the question
In order to leave comments, you need to log in
Alexander Vladimirov , You have not declared the creation of a sheet after the creation of the book.
Add a line here
Private Sub Dan_Exam_Initialize()
k = 4
Workbooks.Add
Nom1 = ActiveWorkbook.Worksheets(List).Cells(k, 1)
And more when you refer to the direct name of the sheet (in your case, List), then it must be written not List but "List" in quotes.
PS Then the macro will give an error on the line No.Value = Nom1
But unfortunately there is not much time to rewrite the entire macro for you.
But the answer to your question is here :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question