change embedded macro event (1 Viewer)

granaha

New member
Local time
Today, 15:55
Joined
Sep 5, 2015
Messages
4
Hi,


I have a project with around 50 forms with all together thousands of controls.
Controls have currently embedded macro on event On Mouse Down.

I would like to change all controls to event On Got Focus and I would like to write a VBA code to change events from On Mouse Down to On Got Focus.

I have found a code how to loop through forms, controls and properties to write an embedded macro text eg. to table. But how to set this On Mouse Down embedded macro to On Got Focus event?

Does anyone know is it possible to set control event embedded macro by VBA?



Thanks
Harri
 

granaha

New member
Local time
Today, 15:55
Joined
Sep 5, 2015
Messages
4
Hi,

Actually I found a solution for this.
It is just simply copy embedded macro from other properties like:
Forms(FormName).Controls(ctlname).OnGotFocusMacro = Forms(FormName).Controls(ctlname).OnMouseDownMacro

-Harri
 

Users who are viewing this thread

Top Bottom