Mortenkamstrup
New Member
- Joined
- Nov 5, 2016
- Messages
- 26
Hello every one 
I have a code where i transform some data to a new sheet which i create by a macro. in each new sheet i create a new button will be created with this code:
Dim btn As Button
Dim t As Range
Set t = ActiveSheet.Range(Cells(2, 15), Cells(2, 15))
Set btn = ActiveSheet.Buttons.Add(t.Left, t.Top, t.Width, t.Height)
The idea with the button which i create on each sheet is to assign another macro which i should use later for each sheet, but i dont know how.
something like:
Assign macro to Btn = ModVersion2
and then the macro in modVersion2 should be assign to the button so i later can click the button for use the macro?
Any kind person who can help me? I can share my Excel ark if it would help just need a litle help to how i should do it
Thanks alot in advance.
I have a code where i transform some data to a new sheet which i create by a macro. in each new sheet i create a new button will be created with this code:
Dim btn As Button
Dim t As Range
Set t = ActiveSheet.Range(Cells(2, 15), Cells(2, 15))
Set btn = ActiveSheet.Buttons.Add(t.Left, t.Top, t.Width, t.Height)
The idea with the button which i create on each sheet is to assign another macro which i should use later for each sheet, but i dont know how.
something like:
Assign macro to Btn = ModVersion2
and then the macro in modVersion2 should be assign to the button so i later can click the button for use the macro?
Any kind person who can help me? I can share my Excel ark if it would help just need a litle help to how i should do it
Thanks alot in advance.
Last edited: