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

回答編集履歴

4

コード訂正

2017/07/11 16:03

投稿

hatena19
hatena19

スコア34367

answer CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  Set coltd = htmlDoc.getElementById("tables").getElementsByTagName("td")
11
11
 
12
- For Each el In colTR
12
+ For Each el In coltd
13
13
  Debug.Print el.innerText
14
14
  Next el
15
15
  ```

3

コードの間違いの修正

2017/07/11 16:03

投稿

hatena19
hatena19

スコア34367

answer CHANGED
@@ -4,7 +4,7 @@
4
4
  下記のコードでどうでしょう。
5
5
 
6
6
  ```
7
- Dim colImg As IHTMLElementCollection
7
+ Dim coltd As IHTMLElementCollection
8
8
  Dim el As IHTMLElement
9
9
 
10
10
  Set coltd = htmlDoc.getElementById("tables").getElementsByTagName("td")

2

書式の修正

2017/07/11 15:48

投稿

hatena19
hatena19

スコア34367

answer CHANGED
@@ -1,4 +1,4 @@
1
- > 「id="tables"の要素を取得して、その中のテーブル要素のtdの値を取得する」
1
+ > **「id="tables"の要素を取得して、その中のテーブル要素のtdの値を取得する」**
2
2
  > というのが目的の処理です。
3
3
 
4
4
  下記のコードでどうでしょう。

1

書式の修正

2017/07/10 16:34

投稿

hatena19
hatena19

スコア34367

answer CHANGED
@@ -3,18 +3,17 @@
3
3
 
4
4
  下記のコードでどうでしょう。
5
5
 
6
+ ```
6
7
  Dim colImg As IHTMLElementCollection
7
8
  Dim el As IHTMLElement
8
9
 
9
10
  Set coltd = htmlDoc.getElementById("tables").getElementsByTagName("td")
10
11
 
11
12
  For Each el In colTR
12
-
13
13
  Debug.Print el.innerText
14
-
15
14
  Next el
15
+ ```
16
16
 
17
-
18
17
  参照設定
19
- Microsoft HTML Object Library
18
+ ``Microsoft HTML Object Library``
20
- Microsoft Internet Controls
19
+ ``Microsoft Internet Controls``