1
서버에 호스팅 된 Excel 파일을 통합 문서로 가져 오기 위해 매크로를 작성하려고합니다. 이것은 내가 지금까지 가지고있는 코드이다.서버의 Excel 파일을 다른 Excel 파일로 가져 오기
Sub ranker()
'
' ranker macro
'
'
Range("Ranker!A10:Ranker!Z100").ClearContents
URL = Range("url!F2" & i).Text
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;" & URL _
, Destination:=Range("Ranker!$A$1:$Z$100"))
.Name = "ranker"
.CommandType = xlCmdTable
.CommandText = Array("'MTD SAR$'")
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
End Sub
유일한 문제는 다음과 같은 대화 상자가 표시된다는 것입니다.
나는 옵션 'MTD SAR $'모든 시간을 선택해야합니다. 대화 상자를 피하기 위해 VBA 코드에서이 옵션을 선택할 수 있습니까? 어떤 도움이라도 대단히 감사하겠습니다.