0
私は、Visual Basicを使用してExcelで数行のデータの検索を実行しようとしています。ビジュアルベーシックから検索をループしようとしています
基本的には、各製品のウェブサイトを検索してください...複数のウィンドウやタブなどを開くかどうかは関係ありません...ウェブページでは何もする必要はありません。ここに私の現在の試みは、次のとおりです。
Private Sub CommandButton1_Click()
Dim index As Integer
index = 1
Dim searchme As String
While Worksheets("Sheet1").Cells(index, 1).Value <> Null
searchme = worsheets("Sheet1").Cells(index, 1).Value
searchmelink = "https://www.grainger.com/search?" & _
"searchBar=true&searchQuery=" & searchme
ThisWorkbook.FollowHyperlink Address:=searchmelink, NewWindow:=True
index = index + 1
End While
End Sub
私はいくつかの理由でEnd While
でエラーを取得しています。
"Compile error:
Expected: If or Select or Sub or Function or Property or Type or With or Enum or end of statement"
私はしてください、おそらく非常に簡単ですが、私はこれに新しいです。
While {test}
{actions}
Wend
またはより典型的には:
はあなたにティムをありがとうございます。 はのisEmpty(....) ループ 感謝まで行います。私は、私は途中でビットを尋ね、代わりに何かをしたはず! – user1825494