maabadi
Well-known Member
- Joined
- Oct 22, 2012
- Messages
- 2,681
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi.
I make userforms and I want when I click on button on userform 1 , it unloads and then show other userforms.
Then I write This Code For Userform1:
But for the Last (yellow Line) code it show
Please Help
What is my Fault.
Thanks
I make userforms and I want when I click on button on userform 1 , it unloads and then show other userforms.
Then I write This Code For Userform1:
Code:
Option Explicit
Private Declare Function GetForegroundWindow Lib "user32.dll" () As Long
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Sub UserForm_Activate()
Me.Height = 0
Call SetWindowLong(GetForegroundWindow, -16, GetWindowLong(GetForegroundWindow, (-16)) And (Not &H400000))
Me.Height = 140
End Sub
Private Sub Welcome_Activate()
RemoveFrame
End Sub
Private Sub EnterData_Click()
Unload Me
InputData.Show
End Sub
Private Sub Report_Click()
Unload Me
SeedReport.Show
End Sub
Private Sub AddNew_Click()
Unload Me
[COLOR=#daa520]AddNew.Show[/COLOR]
End Sub
But for the Last (yellow Line) code it show
Code:
Compile error:
Method or Data Member not found
Please Help
What is my Fault.
Thanks