I have a user that has problems when running the macro below in VBA in Excel
Sub Button1_Click()
Dim msp
Set msp = CreateObject("MSProject.Project")
msp.Application.Projects.Add False
msp.Application.Visible = True
Set p = msp.Application.ActiveProject
' Turn off auto calculation now to speed things up
p.Application.Calculation = 0
p.DefaultDurationUnits = 7
p.DefaultWorkUnits = 7
' Set default font
p.Application.TextStyles32Ex Item:=0, Size:="9", Font:="Calibri"
' Display additional columns
p.Application.TableEdit Name:="&Entry", TaskTable:=True, FieldName:="", NewFieldName:="Work", Title:="", _
Width:=13, Align:=2, ShowInMenu:=True, LockFirstColumn:=True, DateFormat:=255, RowHeight:=1, Column p.Application.TableApply Name:="&Entry"
p.Application.TableEdit Name:="&Entry", TaskTable:=True, FieldName:="", NewFieldName:="Notes", Title:="", _
Width:=16, Align:=2, ShowInMenu:=True, LockFirstColumn:=True, DateFormat:=255, RowHeight:=1, Column p.Application.TableApply Name:="&Entry"
End Sub
It works fine for me and for a lot of people, but it only occurs on one specific computer.
I have tried repairing the installation and it still gives me that error.
![]()
and this is the line it has problems with
![]()
I have no idea what is happening at all. Can anyone please advice me on what I can do to solve this issue?