Cannot find Project or Library

stroffso

Board Regular
Joined
Jul 12, 2016
Messages
160
Office Version
  1. 365
Platform
  1. Windows
I have some code which has always ran perfectly but have recently started getting this error. Has anyone any ideas what is going wrong? The error is highlighted at the Password = Inputbox row.

I have two files with this code in and one works and one doesnt so im presuming I have messed up something in the back end?


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
Application.ScreenUpdating = True
End Sub
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Apologies all I have found the issue in the references section, looks like some bit went haywire, anyone any ideas on how to stop this happening again?
 
Upvote 0
The Missing bit in references was this, not sure if it helps. It looks like its due to using different machines to open the files

AdhocreportingExcelclientlib
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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