runtime error 6..

paran

New Member
Joined
Aug 23, 2021
Messages
32
Office Version
  1. 365
Platform
  1. Windows
hi, while entering the code i get error "runtime error 6.., pls help as I'm new to vba

Private Sub Label8_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim MyPass As Long
MyPass = InputBox("Enter Developer Password", "Developer Setting")
If MyPass = "" Then GoTo WrongDPass
If MyPass = CStr(Sheets("in moves").Range("B101")) Then
Application.Visible = True
Unload Me
Else
MsgBox ("Incorrect Password")
End If
WrongDPass:
End Sub
 
As I said the code is fine. If you’re seeing that message, then the user ID and/or password you entered do not match.
Sorry dear , i got it
Now every thing is fine, but i have coded this workbook. Window(1).visible =false, in this case my password is not acepting since its showing object required error
We want at open the userform should show, macro to run for password access and no exel sheets should be visible and other excek file shoukd work upon opening
Request Pls....
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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