Leaves in Macros Excel

0

I have a problem, I hope you can help me. I have a macro that I collect information from a sheet, in a book, and I take it to another sheet, from another book. Each sheet of origin is recovered with a loop. Up to this point, the problem is when I realize that the origin leaves do not have the same name. For example: Some are called "HE 1" and others "HE1". How can I do to take the data taking into account this inconvenient? Thank you.

    
asked by Calej 21.05.2018 в 14:31
source

1 answer

0

Simply a For...Next loop that runs through all the pages of your book.

Dim WS As Worksheet 'variable para la hoja de cálculo

For Each WS In ThisWorkbook.Sheets 'iniciamos bucle que recorrerá todas las hojas del libro
    WS.Activate
    'resto de tu código.
    'Se ejecutará 1 vez por cada hoja de tu Libro

Next WS

I hope you can adapt it to your needs

    
answered by 21.05.2018 / 22:08
source