投稿日 | : 2004/08/24(Tue) 11:18 |
投稿者 | : ももたろう |
Eメール | : |
URL | : |
タイトル | : IF文の書き方 |
花ちゃんのHPにある「プログラムの最適化」を参考にプログラム修正を行おうと思い、
下記のように変更したのですが、IF文でエラーになってしまいます。
開発環境はXPを使用していますが、XPでは駄目なのでしょうか?
【最適化前】
If lblCopy1.Caption = "処理済" and lblCsvmake1.Caption= "処理済" AND lblExcelmake2.Caption = "処理済" Then
【最適化後】
If (lblCopy1.Caption Or lblCsvmake1.Caption Or lblExcelmake2.Caption) = "処理済" Then
◎上記以外にも試したこと
Dim a1 As String
Dim a2 As String
Dim a3 As String
a1 = lblCopy1.Caption
a2 = lblCsvmake1.Caption
a3 = lblExcelmake2.Caption
a4 = "処理済"
If (a1 or a2 or a3) = a4 Then
よろしくお願いします。