run macro in another excel in onedrive

%3CLINGO-SUB%20id%3D%22lingo-sub-1590620%22%20slang%3D%22en-US%22%3Erun%20macro%20in%20another%20excel%20in%20onedrive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590620%22%20slang%3D%22en-US%22%3E%3CP%3Ehow%20can%20I%20make%20a%20macro%20in%20excel%20A%20and%20save%20it%20in%20onedrive%2C%20and%20I%20share%20another%20excel%20(B)%26nbsp%3B%20which%20runs%20this%20macro%20(%20in%20excel%20A)%2C%20other%20person%20who%20shares%20with%20excel%20B%20and%20can%20use%20excel%20B%20with%20the%20macro%2C%26nbsp%3B%20but%20can%20not%20find%20this%20macro%20or%20edit%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1590620%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1590653%22%20slang%3D%22de-DE%22%3ESubject%3A%20run%20macro%20in%20another%20excel%20in%20onedrive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590653%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F760512%22%20target%3D%22_blank%22%3E%40ericaukland%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EHere%20is%20some%20information%20and%20options%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E1)%20Copy%20a%20macro%20module%20to%20another%20workbook%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fcopy-a-macro-module-to-another-workbook-13c0938b-8432-4259-9177-a71f7e626de0%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fcopy-a-macro-module-to-another-workbook-13c0938b-8432-4259-9177-a71f7e626de0%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E2)%20Call%20VBA%20macro%20in%20external%20workbook%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3ESub%20MacroCalling()%20%3CBR%20%2F%3E%20Application.Run%20%22External_Book.xlsm!%20Test%20Procedure%22%20%3CBR%20%2F%3E%20End%20Sub%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E3)%20Execute%20code%20when%20activating%20%26amp%3B%20exiting%20an%20Excel%20workbook%20%26amp%3B%20worksheet%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CA%20href%3D%22https%3A%2F%2Fsites.google.com%2Fa%2Ferhard-rainer.com%2Ferhard-rainer%2Fcomputer%2Fblog%2Fexcel-vbacodeausfuehrenbeimaktivierenverlasseneinerexcelarbeitsmappe%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CFONT%20size%3D%224%22%3Ehttps%3A%2F%2Fsites.google.com%2Fa%2Ferhard-rainer.com%2Ferhard-rainer%2Fcomputer%2Fblog%2Fexcel-vbacodeausfuehrenbeimaktivierenverlasseneinerexcelarbeitsmappe%3C%2FFONT%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EThese%20are%20some%20information%20and%20possibilities%20that%20could%20lead%20you%20to%20your%20goal.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20find%20this%20helpful%2C%20please%20mark%20it%20as%20%22Best%20Answer%22%20and%20as%20Like%20(click%20thumbs%20up)%2C%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1590980%22%20slang%3D%22en-US%22%3EBetreff%3A%20run%20macro%20in%20another%20excel%20in%20onedrive%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1590980%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3Ethe%20option%202%20below%20is%20very%20useful%2C%20but%20I%20wonder%20could%20you%20please%20advise%3C%2FP%3E%3COL%3E%3CLI%3Ehow%20can%20I%20load%20the%20external%20excel%20in%20onedrive%3F%26nbsp%3B%20we%20have%20to%20refer%20the%20excel%20with%20path%20like%20D%3Aexternal%20folder%20if%20excel%20is%20at%20D%3Aexternal%20folder%2C%20but%20how%20can%20we%20refer%20the%20folder%20in%20onedrive%3F%3C%2FLI%3E%3CLI%3Eanother%20thing%20is%20how%20can%20we%20hind%20the%26nbsp%3B%3CSPAN%3EExternal_Book.xlsm%20even%20though%20other%20persons%20need%20to%20run%20the%20micro%20in%26nbsp%3BExternal_Book.xlsm%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

how can I make a macro in excel A and save it in onedrive, and I share another excel (B)  which runs this macro ( in excel A), other person who shares with excel B and can use excel B with the macro,  but can not find this macro or edit it.

2 Replies
Highlighted

@ericaukland 

Here is some information and options

1) Copy a macro module to another workbook

https://support.microsoft.com/en-gb/office/copy-a-macro-module-to-another-workbook-13c0938b-8432-425...

 

2) Call VBA macro in external workbook

Sub MakroCalling()
Application.Run "External_Book.xlsm!TestProzedur"
End Sub

 

3) Execute code when activating & exiting an Excel workbook & worksheet

https://sites.google.com/a/erhard-rainer.com/erhard-rainer/computer/blog/excel-vbacodeausfuehrenbeim...

 

These are some information and possibilities that could lead you to your goal.

 

If you find this helpful, please mark it as "Best Answer" and as Like (click thumbs up), it will be beneficial to more Community members reading here.

 

Nikolino

I know I don't know anything (Socrates)

 

Highlighted

@Nikolino 

 

Thanks,

the option 2 below is very useful, but I wonder could you please advise

  1. how can I load the external excel in onedrive?  we have to refer the excel with path like D:external folder if excel is at D:external folder, but how can we refer the folder in onedrive?
  2. another thing is how can we hind the External_Book.xlsm even though other persons need to run the micro in External_Book.xlsm