I'm sorry, but my time is limited at the mo so this is a 'quick fix'.
You can't write a multi-range eg Range("C5:E9,G9:H16,B14:E18") to an array (I don't think!), therefore you must copy that multi range to an area and then use that area to write to the array.
Try this (my changes are in red):
Sub GetURLs003()
'SPEEDY CODE
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Dim ar As Variant, Meta As String, shMeta As Worksheet, shDest As Worksheet
Dim i As Long, j As Long, ar1() As Variant, e As Long, lr As Long, tm#
Dim TempSheet As String
Dim checkSheetName As String
tm = Timer
TempSheet = "URL Temp Sheet"
'Get source sheet name
If Len(Range("A6")) < 2 Then
Meta = GetSh("Please Enter the tab name for your Metadata")
Range("A6") = Meta
Else
Meta = Range("A6").Value
Result = MsgBox("Would you like to continue to use the worksheet named below?" & vbCrLf & vbCrLf & Meta, vbYesNo + vbQuestion)
If Result = vbYes Then
Meta = Range("A6")
Else:
Meta = GetSh("Please Enter the tab name for your Metadata")
Range("A6") = Meta
End If
End If
'Check sheet exists
On Error Resume Next
Set shMeta = Sheets(Meta)
On Error GoTo 0
If shMeta Is Nothing Then MsgBox "That sheet doesn't exist!": Exit Sub
'
'/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
'
On Error Resume Next
checkSheetName = Worksheets(TempSheet).Name
If checkSheetName = "" Then Worksheets.Add.Name = TempSheet
checkSheetName = ""
checkSheetName = Worksheets("Helper").CodeName
If checkSheetName = "" Then
Worksheets.Add.Name = "Helper"
Worksheets("Helper").Visible = xlHidden
End If
On Error Goto 0
'
'/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
'
'Set sheet names
Set shDest = Sheets(TempSheet)
'Put source int array
Sheets("Helper").Cells.ClearContents
shMeta.UsedRange.SpecialCells(xlCellTypeVisible).Copy
Sheets("Helper").Range("A1").PasteSpecial xlPasteValues
ar = Sheets("Helper").UsedRange
'Loop through data and write to new array ignoring formula errors on data page!
For i = 2 To UBound(ar, 1)
For j = LBound(ar, 2) To UBound(ar, 2)
If LCase(Left(ar(i, j), 10)) = "site page:" Then
On Error GoTo Nxt
e = e + 1
ReDim Preserve ar1(4, e)
ar1(1, e) = ar(i, j)
ar1(2, e) = ar(i, j + 1)
End If
If LCase(Left(ar(i, j), 8)) = "page url" Then
On Error GoTo Nxt
ar1(3, e) = ar(i, j)
ar1(4, e) = ar(i, j + 1)
End If
Nxt:
On Error GoTo -1
Next
Next
On Error GoTo 0
'Clear destination sheet and write new array
With shDest
.Cells.ClearContents
.Range("A1:E" & UBound(ar1, 2) + 1) = WorksheetFunction.Transpose(ar1)
'Delete unwanted column
.Columns("D:D").EntireColumn.Delete
'Add headers
.Range("A1") = Format(Now, "m/d/yyyy h:mm:ss AM/PM")
.Range("B1") = "Page #"
.Range("C1") = "Page Name"
.Range("D1") = "Page URL"
.Range("E1") = "Notes"
'Delete blank data rows
'On Error Resume Next
lr = .Cells(Rows.Count, 2).End(3).Row
On Error Resume Next
' next line errors if no blank rows!!!
.Range("D1:D" & lr).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0
End With
'Add a new sheet and copy new data to it
With Sheets.Add
.Name = "URL List " & Format(Now, "HH.MM.ss AM/PM")
.Tab.Color = vbGreen
shDest.Range("A1").CurrentRegion.Copy .Range("A1")
.Columns("A:E").Columns.AutoFit
End With
'Sheets("URL List").Activate
'Delete temp sheet
Application.DisplayAlerts = False
Worksheets(TempSheet).Delete
Application.DisplayAlerts = True
'SPEEDY CODE
Application.ScreenUpdating = True
Application.DisplayStatusBar = True
Application.EnableEvents = True
'ActiveSheet.DisplayPageBreaks = False
Application.Calculation = xlCalculationAutomatic
Debug.Print Timer - tm
End Sub
BTW, can you get rid of those functions in Module 1? They add minutes to running a code that normally takes a couple of seconds!