PDA

View Full Version : [SOLVED] VBA to ignore login request?



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!

snb
11-27-2015, 03:49 AM
Disable your virusscanner/firewall.

roxnoxsox
11-27-2015, 04:50 AM
I can't do this as it's not my computer. The log in is requested for the website, not my specific computer I think

snb
11-27-2015, 06:50 AM
If you know better, you know better.

SamT
11-27-2015, 10:44 AM
:D


Windows Security login screen