In the following code, I need to use two Private Declare Functions,
I tried to place them in front of Private Sub CommandButton1_Click()
inside Sheet1.click....But I got error. Where should I place them?
Private Declare Function PrintWindow Lib "user32" (ByVal hWnd As
Long, ByVal hdcBlt As Long, ByVal nFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub CommandButton1_Click()
.......
xx = FindWindow("Notepad", vbNullString)
.......
end sub