ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Wildcard to Activate & Rename Workbooks (https://www.excelbanter.com/excel-programming/390755-using-wildcard-activate-rename-workbooks.html)

Jake

Using Wildcard to Activate & Rename Workbooks
 
Hello,

I know next to nothing about VB, so please pardon if this is a ridiculous
question. I'm attemplting to record a macro that, once a user has 4
workbooks open (with 1 sheet each), the macro will automatically rename the
sheets, and eventually combine them into a single workbook. The 4 initial
workbooks will always begin with the same file name (the sheets will
incidently have the same name as well), but will always have a different
ending. I tried editing the macro so it looks for the beginning of a
workbook/sheet name, followed by a wildcard (see below). That was a no go.
Is this even possible with VB? Any guidance is appreciated.

Windows("otpfailsumclim3*").Activate
Sheets("otpfailsumclim3*").Select
Sheets("otpfailsumclim3*").Name = "Regional Summary"



All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com