tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,194
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have this code:
it works great on my PC buy my cloeges Surface pro just give us this run time error
run-time error '-2147417848 (80010108)
method visible of object _worksheet failed
the strange thing is it doesnt do it every time but after two or three run it does then might be like it for ages,
I get this error then the computer freezes and i have to hit Ctrl alt Del to get out or it just crashes and closes down.
I cant work out why?
i have tried running the macro stoped and preeessing F8 and it runs all the way without an error
does anyone know why it might be doing this?
what i can try to fix it
It run perfectly on my machine?
thanks
Tony
I have this code:
VBA Code:
Sub unHide_Every_Sheet()
Application.EnableEvents = False
Application.ScreenUpdating = False
For Each sht In ActiveWorkbook.Worksheets
If sht.Visible = xlSheetHidden Then
sht.Visible = xlSheetVisible
End If
Next sht
Sheets("Control").Select
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
it works great on my PC buy my cloeges Surface pro just give us this run time error
run-time error '-2147417848 (80010108)
method visible of object _worksheet failed
the strange thing is it doesnt do it every time but after two or three run it does then might be like it for ages,
I get this error then the computer freezes and i have to hit Ctrl alt Del to get out or it just crashes and closes down.
I cant work out why?
i have tried running the macro stoped and preeessing F8 and it runs all the way without an error
does anyone know why it might be doing this?
what i can try to fix it
It run perfectly on my machine?
thanks
Tony