Link to home
Start Free TrialLog in
Avatar of WileyPowers
WileyPowers

asked on

How to reference an open workbook using wildcard in VBA

Hi all,

How do I activate a workbook (which is already open within the current application) for which I know part of the name? Like, I know that the workbook starts with: CMVINXBXINNNI_Index_MorningReport-
but the rest of the name is unknown (or will vary).

Example:
Windows("CMVINXBXINNNI_Index_MorningReport-20070329").Activate

How come I can not reference this workbook in the following manner:
Windows("CMVINXBXINNNI" & "*").Activate

Hope you can help :)
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial