I Ho un file Excel che accede a un URL HTTPS. L'URL come autenticazione di base con nome utente e password.VBA di Excel, ricevo un prompt "Protezione di Windows" quando si accede a un URL
Questa macro è in esecuzione ogni mattina e notte. Ne ha bisogno per essere AUTOMATICO. Ho il nome utente e la password.
Il problema è che ogni volta che eseguo la macro, mi chiede la "sicurezza di Windows". Il nome utente e la password sono già riempiti perché ho aggiunto questa connessione nelle mie credenziali. La "sicurezza di Windows" aspetta solo che un utente faccia clic per entrare. Questa macro dovrebbe essere eseguita automaticamente e non può attendere che qualcuno faccia clic su OK.
Ho provato VBS Script per accedere ma funziona solo quando l'utente è attivo sulla sessione. Vedere questo: VBA code to pass username & password
ho anche provare a mettere il nome utente e la password nella URL del tipo: ...
Come collego senza la "Protezione di Windows" Prompt ???
Qui connessione funzione mio componente aggiuntivo:
Function GetForcast(DateStart As String, DateEnd As String)
Sheets("Forecast RAW").Select
With Sheets("Forecast RAW").QueryTables.Add(Connection:= _
"URL;https://weather.dtn.com/basic/rest-3.4/obsfcst.wsgi?dataTypeMode=0001&dataType=HourlyForecast&startDate='" & DateStart & "'T00:00:00Z&EndDate='" & DateEnd & "'T00:00:00Z&stationID=KILG" _
, Destination:=range("$A$1"))
.Name = "00Z&stationID=KILG"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
'Shell "WScript C:\Temp\Logon.vbs", vbNormalFocus
.Refresh BackgroundQuery:=False
End With
End Function
sei riuscito a risolvere questo? Sto riscontrando lo stesso problema – LucasSeveryn
Hai provato a utilizzare "http" anziché "https" nell'URL? – aprados
Cosa intendi con "Ho provato VBS Script per accedere ma funziona solo quando l'utente è attivo nella sessione"? Puoi spiegarlo di più ... – TheSilkCode