Putting the data onto the worksheet maybe?
Few other errors also -- marked with XXXX
Option Explicit
Sub Populate_Click()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ActiveWorkbook
Set ws = Sheets("Sheet1")
wb.Activate
'XXXX wb.Select
ws.Select
'Add tables going cell by cell
ws.Cells(1, 1).Value = "NWE ID"
ws.Cells(1, 2).Value = "Longitude"
ws.Cells(1, 3).Value = "Latitude"
ws.Cells(1, 4).Value = "Color"
'Format "A1":"D1" as bold, vertical alignment = center.
'XXXX With ws.Range("A1", "d1")
With ws.Range("A1:D1")
.Font.Bold = True
'XXXX .VerticalAlignment = Excel.XlVAlign.xlVAlignCenter
.VerticalAlignment = xlVAlignCenter
.HorizontalAlignment = xlHAlignCenter
End With
'Create an array to set multiple values at once.
Dim Location(5, 4) As String
Location(0, 0) = "1"
Location(0, 1) = "-105.68764"
Location(0, 2) = "45.69796"
Location(0, 3) = "Blue"
Location(1, 0) = "2"
Location(1, 1) = "-104.68494"
Location(1, 2) = "45.69946"
Location(1, 3) = "Red"
'XXXX putting the data onto the sheet
ws.Cells(2, 1).Resize(UBound(Location, 1), UBound(Location, 2)).Value = Location
End Sub