I have actually got my code to the stage where the data is imported using the Web Query function. However, the site is password protected and I need a way to either input the username and password for each time the macro runs or just once at the beginning. I am confused because I got it to work having logged into the site in IE, but the same doesn't seem to work anymore?!?!?! I am totally confused! My code is as follows:
Sub Download_Data()
Dim qryTable As QueryTable
Dim rngDestination As Range
Dim strConnection As String
' Define the connection string and destination range.
strConnection = "URL; Link which i cannot post due to forum blocks"
Set rngDestination = Sheet2.Range("A1")
' Create the QueryTable.
Set qryTable = Sheet2.QueryTables.Add(strConnection, rngDestination)
' Populate the QueryTable.
qryTable.WebSelectionType = xlSpecifiedTables
qryTable.WebTables = "7"
qryTable.WebFormatting = xlWebFormattingAll
qryTable.Refresh False
End Sub
Once again... any help would be much appreciated!