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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

kieran

Active Member
Joined
Oct 27, 2002
Messages
429
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.
 

TradBum

New Member
Joined
Mar 4, 2004
Messages
15
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
 

Ben_UK

Board Regular
Joined
Feb 19, 2003
Messages
206
Thanks m8,

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

think I'd better get some sleep,

Goodnight

Regards

Ben
 

Ben_UK

Board Regular
Joined
Feb 19, 2003
Messages
206
Thanks TB - That is probably closer to what I am looking for,

Regards
Ben
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,161
Messages
5,768,539
Members
425,480
Latest member
br400821

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
Top