Results 1 to 4 of 4

on error doesn't work

Threaded View

  1. #1
    Registered User
    Join Date
    03-16-2009
    Location
    italy
    MS-Off Ver
    Excel 2003
    Posts
    64

    on error doesn't work

    when i disable internet connection to try the error procedure instead of doing the line related to the error the macro show a message error ; can someone tell where the error is thanks .i've added 2 attachments too to see what happens when i push F8.

    
    Workbooks.Add.Activate
    ActiveWorkbook.SaveAs Filename:="C:\documenti1\documenti2\FONDI1\downloaded_etf"
    Sheets("Foglio1").Activate
    Sheets("Foglio1").Name = "dati etf"
            With ActiveSheet.QueryTables.Add(Connection:= _
            "URL;http://www.borsaitaliana.it/bitApp/listino?service=Data&lang=it&main_list=11&sub_list=2" _
            , Destination:=ActiveCell)
            .Name = "listino?service=Data&lang=it&main_list=11&sub_list=2"
            .FieldNames = True
            .RowNumbers = False
           .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .WebSelectionType = xlSpecifiedTables
            .WebFormatting = xlWebFormattingNone
            .WebTables = "6,7,8"
            .WebPreFormattedTextToColumns = True
            .WebConsecutiveDelimitersAsOne = True
            .WebSingleBlockTextImport = False
            .WebDisableDateRecognition = False
            .WebDisableRedirections = False
            
    Etichetta1:
            
            .Refresh BackgroundQuery:=False
            
            'On Error Resume Next
            On Error GoTo Etichetta
    
           
           
           
        End With
    Attached Images Attached Images

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