I don't have Project in order to test but I think the issue is a missing space in the string you generate.
You need to seperate customUIxml from the start of the schema namespace,
mso:customUIxml ns:mso
Sub RemoveCustomUI() Dim customUiXml As String customUiXml = "<mso:customUIxml ns:mso=""http://schemas.microsoft.com/office/2009/07/customui"">" _ & "<mso:ribbon></mso:ribbon></mso:customUI>" ActiveProject.SetCustomUI (customUiXml) End Sub




