It appears that you cant have this library reference in code on Office 2013 standard. However my file is not using powerpivot or power query in any way. Still when I go to run the below code it errors out, anyone any ideas of a way around this? All i want to do is hide and unhide certain tabs when different buttons are pressed
VBA Code:
Sub UnhideAllSheets()
Dim ws As Worksheet
Dim sht As Object
Dim myPassword As String
myPassword = "Resting4444" ' Set password here
Password = InputBox("Enter Password")
Application.ScreenUpdating = False
If Password = "" Then Exit Sub ' Exit if null input or cancel
' Incorrect password
If Password <> myPassword Then
MsgBox Title:="Warning", Prompt:="Incorrect Password"
Exit Sub
End If
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
Sheets("Data").Select
End Sub