In Column G of sheet7 I have a list of initials (two characters each).
In Column H sheet7 I have a list of names that correspond to Column G.
In my code below I hard coded the "initials" (G) and "names" (H)
Im trying to make the code dynamic where column G and H could have added or removed without editing the code.
Simply not sure how to go about this?
Any hints, tips or examples is appreciated.![]()
sLogin = InputBox("Enter initials here! (CAPS only)") Select Case sLogin 'would be Column G Case sLogin = "RS" Case sLogin = "CM" Case sLogin = "DF" Case sLogin = "EF" Do While sLogin <> sLogin ' "" MsgBox "You must enter your Intitals (Caps only!)!" sLogin = InputBox("Enter Initials name here (Caps only!)") Loop End Select If sLogin = "RS" Then 'would be Column H sLogin2 = "Rick S." Call Button_Controls.Buttons_Enabled End If If sLogin = "CM" Then sLogin2 = "Cathy M." Call Button_Controls.Buttons_Enabled End If If sLogin = "DF" Then sLogin2 = "Dave F." Call Button_Controls.Buttons_Enabled End If If sLogin = "EF" Then sLogin2 = "Eileen F." Call Button_Controls.Buttons_Enabled End If Sheets(1).Shapes.Range(Array("CommandButton1")).Visible = False Sheets("Main Page").Unprotect Sheets("Main Page").Range("E16").Value = sLogin2 & " " & Now() Sheets("Main Page").Protect sLogin = sLogin & " " & Now
Bookmarks