Hello,
I'm having a problem with this code when viewed online. Here's the code:
Evidently I must explicitly define "Application". So when I add:VB Code:
Private Sub UserForm_Initialize() Dim OldState As Integer OldState = Application.WindowState Application.WindowState = xlMaximized Me.Top = Application.Top Me.Left = Application.Left Me.Height = Application.Height Me.Width = Application.Width Application.WindowState = OldState End Sub
Dim xlApp as Excel.Application
I'm unsure of what to set it to:
Set xlApp = ????????
I tried adding "Excel.Application" to each line:
OldState = Excel.Application.WindowState
Excel.Application.WindowState = xlMaximized
etc....
but I'm still getting error 1004, object not SET. What do I set the object to? This is straight Excel/VBA.
Thank you,
CJ




Reply With Quote