marco is not properly working in copied file

Copper Contributor

I wand to copy a .xlsm File (test.xlsm) with a custom ribbon and 2 macros.

Now my copied files (test - kopie.xlsm) looks the same, but after testing the macros it will open the original file in background and is remote controlling the original file instadt of working on it´s own file.


Sub MultipliziereMit10()
    Dim ws As Worksheet
    Set ws = ThisWorkbook.Sheets("Tabelle1")
    Dim i As Integer
    For i = 1 To 16
        ws.Cells(i, "B").Value = ws.Cells(i, "A").Value * 10
    Next i
End Sub

my intention is, that i want to provide a sheet in a network folder where people in my company can copy my funktions for their own use.

This code is only a simple example, of the problem, where copied files can´t run the ribbon funktions propperly. 

2 Replies



I assume you have edited the ribbon by using right-click, Customize ribbon. This does not work for individual workbooks. You can however add a button to your quick access toolbar which is tied to the macro in the workbook JUST FOR THE DOCUMENT: 



@Jan Karel Pieterse yes, you are right. I found a way to make it a ribbon with the Office RibbonX Editor. I think a Ribbon is easyer to use.