Hyperlink & MsgBox

Ben_UK

Board Regular
Joined
Feb 19, 2003
Messages
206
Hiya Board,

On sheet 1 I have a Autoshape (BOX) that when pressed ..activates a hyperlink to a sheet in another workbook (Sheetname = "Test" )

This is what I am trying to do... When the box on sheet one is pressed a message box appears that requests a password which allows the person to access the "Test" worksheet.

Any help would be greatly appreciated,

Kind Regards
Ben.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Ben,

Open the test workbook and then save it with a password.
Every time it is then opened will cause excel to prompt for a password.
 
Upvote 0
How's this for a start:
Code:
Sub Password()
    Dim Response As String
    
    Response = InputBox("Please enter a Password", "Password Required")
    
    Select Case Response
        Case "MyPassword"
            Sheets("Test").Visible = True
            Application.Goto Reference:=['Test'!A1]
        Case Is <> "MyPassword"
            MsgBox "You don't not have authority to access this sheet", _
            vbCritical + vbOKOnly, "Access Denied"
    End Select
                
End Sub
Hope that helps,

Smitty
 
Upvote 0
Thanks m8,

dont know why i didnt think of that easy solution :oops:

think I'd better get some sleep,

Goodnight

Regards

Ben
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,208
Members
448,554
Latest member
Gleisner2

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