teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

未使用関数を削除 & ファイルを上書きできないバグ除去

2015/04/18 18:24

投稿

htsign
htsign

スコア870

answer CHANGED
@@ -58,22 +58,11 @@
58
58
  .Type = adTypeBinary
59
59
  .Open
60
60
  .Write xhr.responseBody
61
- .SaveToFile ActiveWorkbook.Path & "\vbatemp"
61
+ .SaveToFile ActiveWorkbook.Path & "\vbatemp", adSaveCreateOverWrite
62
62
  .Close
63
63
  End With
64
64
  End Sub
65
65
 
66
- Private Function CreateRegExp(ByVal pattern As String, Optional ByVal ignoreCase As Boolean = True) As Object
67
- Dim re As Object
68
- Set re = CreateObject("VBScript.RegExp")
69
- re.pattern = patternString
70
- re.ignoreCase = ignoreCase
71
-
72
- Set CreateRegExp = re
73
-
74
- Set re = Nothing
75
- End Function
76
-
77
66
  Private Function FindFirstUrlFromGoogleImageSearch(ByVal html As String) As String
78
67
  Dim partOfHtml As String
79
68
  Dim idx As Long