Error with AdhocreportingExcelclientlib

stroffso

Board Regular
Joined
Jul 12, 2016
Messages
160
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I think the problem might be something else. I've tried recreating your scenario but I'm not getting an error. Can you give any further info on the error message? If Option Explicit has been used, then you'll need to declare Password.

VBA Code:
Dim myPassword As String, Password as String
 
Upvote 0
Thanks for the response. it has always worked fine with the above code until it was used on another PC and after searching through forums it says that its to do with Office 13 not having the right library reference. However it did work before on the same machine. I know this is vague but even a work around is all that I really need so it doesnt need that library involved
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top