LINKING MESSAGE BOX

mrbeanyuk

Board Regular
Joined
Nov 30, 2005
Messages
212
Morning All!

Is there a way in which I can link a message/popup box to appear in a particular place? At the moment, with dual screen in appears on the right screen, when I want it to pop up in the middle of the left, preferably next to cell G:25.

Current coding:

Private Sub Workbook_Open()
Dim user_name As String
Dim FBR As Long
user_name = InputBox("Please enter your ISIS username to access the Project HERMES interface. Please note that this spreadsheet should not be amended in any way.", "PROJECT HERMES LOGIN", "")
If accept_name(user_name) = False Then
ActiveWorkbook.Close (0)
Exit Sub
End If
With Sheets("Homepage")
FBR = .Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
.Cells(FBR, 2) = user_name
.Cells(FBR, 1) = Now
End With
End Sub

Function accept_name(uname As String) As Boolean
Select Case UCase(uname)
Case "MUIRHEADN110"
accept_name = True
Case "CUTLERH343"
accept_name = True
Case "LIGHTWINGC840"
accept_name = True
Case "ORRP759"
accept_name = True
Case "USERNAME"
accept_name = True
Case Else
accept_name = False
End Select
UnhideSheets
End Function
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

hatman

Well-known Member
Joined
Apr 8, 2005
Messages
2,664
Mmmm, you may want to consider using a Userform instead... then you can specify the Top and Left properties...
 

Forum statistics

Threads
1,136,991
Messages
5,678,993
Members
419,797
Latest member
ikethegenius

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