RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 790
- Office Version
- 365
- Platform
- Windows
Hi guys, bashing my head against a wall here.
Here's how I load my Control Panel Userform from a button on my sheet:
On this Control Panel Userform are many buttons, one of them is supposed to load an Import Panel, unloading the Control Panel in the process:
For some reason, this isn't doing anything, but before it was saying "Compile Error: expected function or variable" which isn't that helpful to me.
Any ideas? Cheers.
Here's how I load my Control Panel Userform from a button on my sheet:
VBA Code:
Sub CPanel_Click()
Load CPanel
CPanel.Show
End Sub
VBA Code:
Private Sub Userform_Initialize()
Me.StartUpPosition = 0
Dim Top As Double, Left As Double
Top = Abs(Application.Top) + _
(Application.Height - ActiveWindow.Height) + _
(Application.UsableHeight - ActiveWindow.UsableHeight)
Left = Abs(Application.Left) + ActiveWindow.Width - ActiveWindow.UsableWidth
Me.Top = Top
Me.Left = Left
End Sub
On this Control Panel Userform are many buttons, one of them is supposed to load an Import Panel, unloading the Control Panel in the process:
VBA Code:
Private Sub ImportPanel_Click()
Call Userforms.ImportOpen
End Sub
Sub ImportOpen()
Load ImportPanel
End Sub
For some reason, this isn't doing anything, but before it was saying "Compile Error: expected function or variable" which isn't that helpful to me.
Any ideas? Cheers.