When I add the following code; If wscf = "ADH" Then MsgBox( "Go to the sheet")…
Jump to turn (6)
- 1When I add the following code; If wscf = "ADH" Then MsgBox( "Go to the sheet") W
- 2When I include the code I get a subscrit out of range error on the line Set wscf
- 3The value in I2 always has a sheet
- 4The ADH sheet is the only sheet among 70 other sheets that will never have the v
- 5In my excel sheet, the value of I2 is dependent on the value entered in A2. I re
- 6I have applied your code but I am getting an error on this line: If Not wscf Is
- User
When I add the following code; If wscf = "ADH" Then MsgBox( "Go to the sheet") Workbook.Sheet ("ADH").Select Exit Sub, to the following code I get an error. Can you please show me how to add it. If Not Intersect(Target, Range("A2")) Is Nothing Then 'Currently in A2
Dim wscf As Worksheet Dim adminRequestCell As Range Dim answer As VbMsgBoxResult
Set wscf = Worksheets(Range("I2").Value) Set adminRequestCell = wscf.UsedRange.Columns("B").Find("Admin Request", , xlValues, xlWhole, xlByColumns)
Const ADMIN_REQUEST_EXISTS_MSG As String = "Admin Request has already been sent. Do you want to RE-SEND?"
If Not adminRequestCell Is Nothing Then 'Admin Request Found answer = MsgBox(ADMIN_REQUEST_EXISTS_MSG, vbYesNo + vbQuestion, "Resend details") If answer = vbYes Then
- Assistant
If wscf.Name = "ADH" Then MsgBox "Go to the sheet" ThisWorkbook.Sheets("ADH").Activate Exit Sub End If 'Continue with the rest of the code End If