로그인 유지
이 게시판은 아별닷컴 회원만 질문을 올릴 수 있습니다. 회원에게 주어지는 특권인셈이지요. 회원이 아닌 분들은 열람만 가능합니다.
2009.12.16 18:19
아래 코드를 사용해보세요.
Excel 2003, 2007, 2010 모두에서 테스트해본 결과 모두 잘 돌아갑니다.
새 창으로
선택한 기호
아래 코드를 사용해보세요.
Excel 2003, 2007, 2010 모두에서 테스트해본 결과 모두 잘 돌아갑니다.
Dim strURL As String
Dim strTargetDate As String
strTargetDate = Format(DateAdd("D", -1, Date), "yyyymmdd")
strURL = "URL;http://www.kofiabond.or.kr/SGPG/SGPG_mtrs_1.asp?start_date="
strURL = strURL & strTargetDate
With ActiveSheet.QueryTables.Add(Connection:=strURL, Destination:=Range("A1"))
.Name = "SGPG_mtrs_1.asp?start_date=" & strTargetDate
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = """tDownload"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub