I cannot find my typo. Trying to add a new VBA case number but the InputBox does not popup. No error it just ends. I'm dyslexic, so 99% sure it a typo.
I'm able to toggle the commented line to the previous 3 option version & it works. I could use another set of eyes to find the error, please!
I'm able to toggle the commented line to the previous 3 option version & it works. I could use another set of eyes to find the error, please!
VBA Code:
Sub Select1BL()
Dim FileToOpen As Variant
Dim OpenBook As Workbook
FileToOpen = Application.GetOpenFilename(Title:="Browse for your File", FileFilter:="Excel Files (*.xls*),*xls*")
If FileToOpen <> False Then
Set OpenBook = Application.Workbooks.Open(FileToOpen)
Else
MsgBox "This file is already in use. Please try again later."
Exit Sub
End If
Dim findSub As String
Dim r As Range
Dim First_Address As String
Dim bCancelled As Boolean
On Error GoTo ErrHandler
Dim number As Integer
On Error Resume Next
Sheets("OFFICE").Select
ActiveSheet.ShowAllData
TryAgain:
'number = Application.InputBox("Enter the corresponding number for the type of edit you wish to complete:" & vbCrLf & vbCrLf & "1= Add a Resubmittal row" & vbCrLf & "2= Add a PM update to an existing submittal" & vbCrLf & "3= Add an Architect update to an existing submittal" & vbCrLf & vbCrLf & "Click Cancel to exit", "What would you like to do?", Type:=1)
number = Application.InputBox("Enter the corresponding number for the type of edit you wish to complete:" & vbCrLf & vbCrLf & "1= Add a Resubmittal row" & vbCrLf & "2= Add a PM update to an existing submittal" & vbCrLf & "3= Add an Architect update to an existing submittal" & vbCrLf & "4= Mark an existing submittal as distributed" & vbCrLf & vbCrLf & "Click Cancel to exit", "What would you like to do?", Type:=1)
If number = False Then Exit Sub
Select Case number
Case "1"
Call AddResubRowBL
Case "2"
Call PmStatUpdateBL
Case "3"
Call ARCHStatUpdateBL
Case "4"
Call DistributedBL
Case Else
End Select
Question:
CarryOn = MsgBox("Would you like to do anything else?", vbYesNo, "Continue?")
If CarryOn = vbYes Then
GoTo TryAgain
GoTo Question
End If
Exit Sub
ErrHandler:
MsgBox "An error (" & Err.Description & ") has occurred." & vbCrLf & _
"Please try again." & vbCrLf & vbCrLf & _
"If the error persists, please contact your manager.", vbExclamation, "Error"
End Sub