HosseinReihai
New Member
- Joined
- Dec 30, 2015
- Messages
- 5
Hello all,
I have a very disgusting and confusing problem with my VBA codes:
I have a user form which consists of a four-page multipage control.
I have Also a Module for public subs and funcs.
I have placed an Autpen sub in the Module which is:
The line "MainMenue.Show" has to initiate the user form but when I Open the file, The "Object Required" error appears. As its obvious, "MainMenue" is that user form.
I have to say that of the multipage's pages is the materials which I have copied from another user form I wrote before, which works well with "UserForm.Show" without any errors.
This is MSP VBA but I think its prob is similar with Excel.
PLEASE HELP ASAP. THIS IS VERY IMPORTANT FOR ME!
I have a very disgusting and confusing problem with my VBA codes:
I have a user form which consists of a four-page multipage control.
I have Also a Module for public subs and funcs.
I have placed an Autpen sub in the Module which is:
Code:
Sub Auto_Open()
'First it deletes the last projects remainings including tasks and etc
ViewApplyEx Name:="Resource Sheet", ApplyTo:=0
SelectAll
Application.DisplayAlerts = False
EditDelete
ViewApplyEx Name:="gantt chart", ApplyTo:=0
SelectAll
EditDelete
Application.DisplayAlerts = True
'set the calendar for all days working
Dim i As Integer
For i = 1 To 7
ActiveProject.Calendar.WeekDays(1).Working = True
Next i
'Now, everything's ready to introduce new project
MainMenue.Show
End Sub
I have to say that of the multipage's pages is the materials which I have copied from another user form I wrote before, which works well with "UserForm.Show" without any errors.
This is MSP VBA but I think its prob is similar with Excel.
PLEASE HELP ASAP. THIS IS VERY IMPORTANT FOR ME!
Last edited by a moderator: