roxnoxsox
11-27-2015, 02:37 AM
I'm trying to create a macro which will populate data from a website into excel, however this keeps coming up with a Windows Security login screen. I have to click cancel 10 times for each time I try to download from this website and then it will populate. I've tried entering my login info too but this still doesn't work.
The macro I'm using is:
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;websitegoeshere", _
Destination:=Range("$P$25"))
.Name = "websitegoeshere"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
For security reasons I can't name the website sadly. Would anyone happen to know a way around this? Let me know if you need any further info at all!
The macro I'm using is:
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;websitegoeshere", _
Destination:=Range("$P$25"))
.Name = "websitegoeshere"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
For security reasons I can't name the website sadly. Would anyone happen to know a way around this? Let me know if you need any further info at all!