Results 1 to 5 of 5

On Error Resume Next

Threaded View

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    On Error Resume Next

    Why doesn't this code exit on the first "Cancel" selection from the first inputbox?
    When I select Cancel from the first inputbox it goes to the next inputbox and I have to select Cancel again, then it exits the sub.
        On Error Resume Next
        sMyPath = InputBox("Enter Folder path. Example: C:\MEASURE-6000\OUTPUT\", , "C:\MEASURE-6000\OUTPUT")
        If Err.Number = 13 Then Exit Sub
        On Error GoTo 0
        sMyFileType = InputBox("Enter File type. Example: txt = Text file, csv = Excel CSV file, xls = Excel XLS file, xlsx = Excel XLSX file, etc.", , "OUT")
        If Err.Number = 13 Then Exit Sub
        On Error GoTo 0
    Any hints, tips or examples are welcome.
    Last edited by Rick_Stanich; 01-20-2010 at 10:36 AM.
    Regards

    Rick
    Win10, Office 365

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1