MikeRetyred
New Member
- Joined
- May 18, 2019
- Messages
- 11
My project is to recreate MS Money in Excel - thanks to my son’s advice and the inspiration from the helpful members of various Excel Forums. Now it’s testing, creating and revising display formats and testing, testing again.
Could any member help me to find a solution and to understand why this lates glitch happens?
To protect all worksheets I use this macro which works every time:
Sub ProtectAllWorksheets()
'Protects all Worksheets in Workbook
'Loop through all worksheets
Dim ws As Worksheet
For Each ws In Worksheets
ws.Protect
Next ws
End Sub
After protection I’d like to go to a specific sheet and tried this addition to the macro:
Sub ProtectAllWorksheets()
'Protects all Worksheets in Workbook
'Loop through all worksheets
Dim ws As Worksheet
For Each ws In Worksheets
ws.Protect
Next ws
ws("TransReg").Select
End Sub
Which doesn’t work, more to the point the original macro will no longer work at all even after taking out the ‘ws("TransReg").Select’. In fact I have to close the unsaved file to restore the original macro which then works. I’ve tried it with Worksheets or Sheets to replace ws but the same result.
I'd appreciate your help
MikeRetyred
(Office 365 on MacMini macOS Mojave 10.14.6)
Could any member help me to find a solution and to understand why this lates glitch happens?
To protect all worksheets I use this macro which works every time:
Sub ProtectAllWorksheets()
'Protects all Worksheets in Workbook
'Loop through all worksheets
Dim ws As Worksheet
For Each ws In Worksheets
ws.Protect
Next ws
End Sub
After protection I’d like to go to a specific sheet and tried this addition to the macro:
Sub ProtectAllWorksheets()
'Protects all Worksheets in Workbook
'Loop through all worksheets
Dim ws As Worksheet
For Each ws In Worksheets
ws.Protect
Next ws
ws("TransReg").Select
End Sub
Which doesn’t work, more to the point the original macro will no longer work at all even after taking out the ‘ws("TransReg").Select’. In fact I have to close the unsaved file to restore the original macro which then works. I’ve tried it with Worksheets or Sheets to replace ws but the same result.
I'd appreciate your help
MikeRetyred
(Office 365 on MacMini macOS Mojave 10.14.6)