Hi,
I have a macro that works when Excel is opened. I need it to work when the active workbook name is "EXCEL_OMZET_SHEET1.XLS". Also this number 1 must be variable and can be 1 till 20. For each number it needs to trigger the function.
I have used the following:
If ActiveWorkbook.Name = "EXCEL_OMZET_SHEET1.XLS" Then
....
End If
But it doesnt work??.. Can someone tell me what is wrong and share an opinion about the variable number before ".XLS" So that the macro works for the following:
"EXCEL_OMZET_SHEET1.XLS"
"EXCEL_OMZET_SHEET2.XLS"
"EXCEL_OMZET_SHEET3.XLS"
etc....
I have a macro that works when Excel is opened. I need it to work when the active workbook name is "EXCEL_OMZET_SHEET1.XLS". Also this number 1 must be variable and can be 1 till 20. For each number it needs to trigger the function.
I have used the following:
If ActiveWorkbook.Name = "EXCEL_OMZET_SHEET1.XLS" Then
....
End If
But it doesnt work??.. Can someone tell me what is wrong and share an opinion about the variable number before ".XLS" So that the macro works for the following:
"EXCEL_OMZET_SHEET1.XLS"
"EXCEL_OMZET_SHEET2.XLS"
"EXCEL_OMZET_SHEET3.XLS"
etc....