0
Sub Macro1()
'
' Macro1 Macro
'
'
Dim wn, contacts, report As Excel.Window
Dim windows(1 To 100) As Excel.Window
Dim i As Integer
i = 1
For Each wn In Application.windows
windows(i) = wn
i = i + 1
Next wn
If IsEmailValid(windows(1).Cells(1, 1)) = True Then
report = windows(1)
contacts = windows(2)
Else
contacts = windows(1)
report = windows(2)
End If
End Sub
여기서 무엇이 보이지 않습니까? 나는 VBA에 대해 내가 아는 바에 따라 최선을 다하고 있습니다. 의견에 미리 감사드립니다. 당신은 havn't는윈도우 핸들을 변수로 전달
너는하려고하는거야? 작동하지 않는 것은 무엇입니까? FWIW, 당신은 변종으로'wn'과'contacts'를 선언하고 있습니다. –