I have a macro that asks for the prefix to a workbook name. The suffix is always the same and the depending on the prefix added byt he user depends ont ehw workbook opened.
i.e if user inputs "UK", uk_promo.xls opens
if user inputs "canada", canada_promo.xls opens
I have only one macro which consists of copying and pasting data from the promo sheet to other sheets. I would like to be able to select the sheet based on the suffix i.e. *_promo.xls rather than the whole filename as this changes depending on what the user has input. Does anyone know how to do this? At the moment, the macro will only work with a uk promo workbook.
ActiveWindow.WindowState = xlMinimized
Windows("UK_PROMO.xls").Activate
ActiveWindow.WindowState = xlMaximized
Sheets("promo qtr").Select
i.e if user inputs "UK", uk_promo.xls opens
if user inputs "canada", canada_promo.xls opens
I have only one macro which consists of copying and pasting data from the promo sheet to other sheets. I would like to be able to select the sheet based on the suffix i.e. *_promo.xls rather than the whole filename as this changes depending on what the user has input. Does anyone know how to do this? At the moment, the macro will only work with a uk promo workbook.
ActiveWindow.WindowState = xlMinimized
Windows("UK_PROMO.xls").Activate
ActiveWindow.WindowState = xlMaximized
Sheets("promo qtr").Select