Forum Discussion
LeeCornellWhittens
Jan 14, 2022Copper Contributor
VBA Macro "yes to all" on dialogue box
Hi all, first time poster here - I use Office 365 I create reports for data each day and need to collect the same worksheet from each daily report to place in an end of month workbook. I also ne...
Jan 14, 2022
If you run the following code on each workbook before it is copied, it will delete the workbook-level names
With ActiveWorkbook
For i = .Names.Count To 1 Step -1
If InStr(.Names(i).Name, "!") = 0 Then
.Names(i).Delete
End If
Next i
End With
- LeeCornellWhittensJan 14, 2022Copper Contributor
Doug_Robbins_Word_MVP , thanks for that, but I don't want to delete them. I guess I could in a pinch, seeing the files close without saving, but I really just want to accept the "yes to all" option.
- Jan 14, 2022Just close the files without saving them.