Hello guys,
I hope somebody out there can help me with the problem I am facing.
I have some word 2010 VBA codes that open a new excel 2010 sheet and now I want to change the code name of the active excel sheet from word vba itself.
the codes that i am using to change the code name of the excel sheet dont seem to work .
Dim oXL1 As Object
Dim oWB1 As Object
Set oXL1 = CreateObject("Excel.Application")
Set oWB1 = oXL1.Workbooks.Add
oXL1.Visible = False
oWB1.VBProject.VBComponents(Sheets("Tabelle1").CodeName).Name = "newcodename"
the error message that i am getting is "The programatic access to the visual basic project is not safe"
thank you.
Bookmarks