Link to home
Start Free TrialLog in
Avatar of Seamus2626
Seamus2626Flag for Ireland

asked on

ThisWorkbook.name

Hi, i have this formula in the VBA editor

.Range("U1").Formula = DateSerial(Mid(ThisWorkbook.Name, 13, 4), Mid(ThisWorkbook.Name, 11, 2), Mid(ThisWorkbook.Name, 9, 2))

The code opens another file which im trying to read the date off, one of the problems, is that because the above formula is in the editor of my core spreadsheet, thats spreadsheet name its trying to read. So i need it to be amended so it can read the active workbooks name

Thanks
Seamus
Avatar of jppinto
jppinto
Flag of Portugal image

Dim wk as Workbook
Set wk = ActiveWorkbook
ASKER CERTIFIED SOLUTION
Avatar of jppinto
jppinto
Flag of Portugal 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
Avatar of Seamus2626

ASKER

Excellent, thanks Jppinto!

Seamus