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

質問編集履歴

1

ご返信ありがとうございます。「確定ボタン」はwebページ上に存在するもので、押下すると入力情報を確認する画面に遷移します。vbaの呼び出しはvbeから実行です。(コードを追記しました)。お願い致します

2018/11/29 07:02

投稿

jft
jft

スコア10

title CHANGED
File without changes
body CHANGED
@@ -9,18 +9,49 @@
9
9
 
10
10
  初心者故に、提供情報が漏れているかもしれませんが、どうぞよろしくお願い致します。
11
11
 
12
+ [20181129追記_1]
13
+ ・VBAのコード、HTMLのコードを一部追記
14
+
12
15
  ### 該当のソースコード
13
16
 
14
17
  ```vba
18
+
19
+ Sub bulklist()
20
+
21
+ '情報入力ページにアクセスする
22
+ Dim objIE As Object 'IEオブジェクトを準備
23
+ Set objIE = CreateObject("Internetexplorer.Application")
24
+ objIE.Visible = True 'IEを表示
25
+ objIE.navigate "URL(省略)" 'IEでURLを開く
26
+ Do While objIE.Busy = True Or objIE.readyState < READYSTATE_COMPLETE '読み込み待ち
27
+ DoEvents
28
+ Loop
29
+
30
+ '入力ページでHTMLオブジェクトをセット
31
+ Dim htmlDoc2 As HTMLDocument 'HTMLドキュメントオブジェクトを準備
32
+ Set htmlDoc2 = objIE.document 'objIEで読み込まれているHTMLドキュメントをセット
33
+
34
+ 'セレクトボックスに値を入れる
15
35
  Dim elinput_othershipping_1 As IHTMLElement
16
36
  Set elinput_othershipping_1 = htmlDoc2.getElementById("auc_shipname_standard1")
17
37
 
18
38
  elinput_othershipping_1.Value = "レターパックプラス"
19
39
  waitTime = Now + TimeValue("0:00:03")
20
40
  Application.Wait waitTime
41
+
42
+ '途中省略
43
+
44
+ '確認画面へ
45
+ Dim elinput_submit As IHTMLElement
46
+ Set elinput_submit = htmlDoc2.getElementById("auc_submit2")
47
+ elinput_submit.Click
48
+
49
+ End sub
21
50
  ```
22
51
 
23
52
  ```html
53
+ '該当箇所省略
54
+
24
55
  <div id="auc_shipname_block1" class="modSubTable03 other_ship_block ">
25
56
  <dl class="untInr">
26
57
  <dt class="ptsHead"><span>配送方法1</span></dt><!-- /.ptsHead -->
@@ -103,6 +134,38 @@
103
134
  </dd><!-- /.ptsDtl -->
104
135
  </dl><!-- /.untInr -->
105
136
  </div><!-- /.modSubTable -->
137
+
138
+ '省略
139
+
140
+ '以下入力情報確認画面への遷移ボタン
141
+
142
+
143
+ <!--
144
+ FORM FOOTER
145
+ -->
146
+
147
+ <div id="modFormSbt">
148
+ <div class="pts02a">
149
+ <div class="pts02c">
150
+ <p><span class="Button Button--normalSmall"><input id="acMdSave2" onClick="return onDraftSubmit('https://auctions.yahoo.co.jp/sell/jp/config/draft_save');" value="下書き保存" type="button"></span></p>
151
+ <div class="clr"></div>
152
+ </div>
153
+ </div>
154
+
155
+ <div class="alignC">
156
+ <div class="m0Auto w390 cf">
157
+ <div class="floatL mT10">
158
+ <span class="Button Button--normalSmall">
159
+ <input id="acMdBack2" onClick="submitDescription(); Ya.submit(document.auction, 'https://auctions.yahoo.co.jp/sell/jp/show/topsubmit', '', '', 'utf-8');" value="前の画面に戻る" type="button" class="auc_input_back">
160
+ </span>
161
+ </div>
162
+ <span class="Button Button--proceedLarge"><div class="floatR"><input id="auc_submit2" onClick="return onItemSubmit(this, 'https://auctions.yahoo.co.jp/sell/jp/show/preview');" value="確認画面へ" type="button"></div></span>
163
+ </div>
164
+ </div>
165
+ </div>
166
+
167
+ '以下省略
168
+
106
169
  ```
107
170
 
108
171