Home

Share Excel VB module used in ribbon macro with home laptop and work PC.

%3CLINGO-SUB%20id%3D%22lingo-sub-195456%22%20slang%3D%22en-US%22%3EShare%20Excel%20VB%20module%20used%20in%20ribbon%20macro%20with%20home%20laptop%20and%20work%20PC.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-195456%22%20slang%3D%22en-US%22%3E%3CP%3EI%20recently%20upgraded%26nbsp%3B%20from%20Excel%202002%20to%20Office%20365%26nbsp%3B%20as%202002%20has%20crashed%20and%20I%20can't%20find%20the%20disks.%20I%20was%20surprised%20to%20find%20my%20workbooks%20work%20well%20with%20the%20new%20Excel.%20I%20am%20currently%20challenged%20with%20creating%20a%20ribbon%20UI%20for%20my%20macros.%20I%20have%20many%20VB%20files%20stored%20in%20the%20file%20RMEJMOD.xls.%20The%20file%20is%20currently%20stored%20in%20a%20Dropbox%20folder.%20The%20path%20to%20this%20folder%20is%20different%20in%20the%20home%20W7%20laptop%20than%20the%20W10%20PC%20at%20work.%26nbsp%3B%20The%20macros%20used%20from%20this%20file%20called%20from%20all%20buttons%20I%20created%20in%20my%20workbooks%20work%20seamlessly%20but%20not%20in%20the%20custom%20ribbon%20I%20created.%20The%20path%20appears%20when%20you%20hover%20the%20mouse%20over%20the%20macro%20name%20in%20Customize%20Ribbon.%20It%20appears%20that%20the%20ribbon%20calls%20carry%20the%20full%20path%20to%20the%20macro%20and%20therefore%20will%20not%20execute%20when%20I%20import%20the%20ribbon%20UI%20from%20the%20other%20machine%20even%20when%20updating%20the%20link%20location.%20When%20the%20macro%20is%20selected%20I%20get%20the%20popup%20%22Sorry%2C%20Excel%20can't%20open%20two%20workbooks%20with%20the%20same%20name%20at%20the%20same%20time.%22%3C%2FP%3E%3CP%3EI%20could%20create%20a%20ribbon%20for%20each%20machine%20but%20I%20hope%20there%20is%20a%20better%20way.%3C%2FP%3E%3CP%3EI%20really%20need%20a%20solution%20for%20this%20as%20I%20use%20at%20least%202%20dozen%20macros%20in%20my%20workbooks%20every%20day.%3C%2FP%3E%3CP%3EAny%20help%20will%20be%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-195456%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20%26amp%3B%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eribbon%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-195499%22%20slang%3D%22en-US%22%3ERe%3A%20Share%20Excel%20VB%20module%20used%20in%20ribbon%20macro%20with%20home%20laptop%20and%20work%20PC.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-195499%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20suggest%20storing%20your%20macros%20in%20an%20add-in.%26nbsp%3B%20This%20will%20allow%20you%20to%20access%20them%20on%20both%20machines.%26nbsp%3B%20You%20will%20just%20need%20to%20install%20the%20add-in%20on%20both%20machines.%26nbsp%3B%20An%20Add-In%20can%20store%20all%20of%20your%20macros%20and%20your%20ribbon%20interface%20and%20allow%20you%20the%20ability%20to%20have%20access%20to%20them%20all%20of%20the%20time.%26nbsp%3B%20This%20would%20prevent%20you%20from%20having%20to%20call%20the%20macros%20from%20X%20or%20Y%20file%20path.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20is%20a%20basic%20article%20about%20how%20to%20create%20an%20Add-In%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftrumpexcel.com%2Fexcel-add-in%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Ftrumpexcel.com%2Fexcel-add-in%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20manipulate%2Fcustomize%20the%20ribbon%20you'll%20need%20the%20UI%20Editor%26nbsp%3B%20There%20is%20also%20some%20useful%20information%20on%20Ron's%20site%20the%20involves%20customizing%20ribbons....%20%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.rondebruin.nl%2Fwin%2Fs2%2Fwin001.htm%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.rondebruin.nl%2Fwin%2Fs2%2Fwin001.htm%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20option%20would%20be%20to%20store%20your%20macros%20in%20the%20personal%20macro%20workbook%20and%20link%20them%20to%20the%20Quick%20Access%20Toolbar%20(QAT).%26nbsp%3B%20This%20would%20also%20allow%20you%20to%20store%20the%20macros%20locally%20and%20not%20have%20to%20open%20or%20call%20macros%20from%20an%20.xls%20file%20stored%20in%20X%20or%20Y%20file%20path.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAbout%20the%20Personal%20Workbook%3A%20%3CA%20href%3D%22https%3A%2F%2Fchandoo.org%2Fwp%2Fusing-personal-macro-workbook%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fchandoo.org%2Fwp%2Fusing-personal-macro-workbook%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20need%20additional%20help%20converting%20the%20macros%20to%20an%20Add-In%20or%20Personal%20Workbook%20after%20reviewing%20the%20above%20links%20please%20reach%20back%20out.%26nbsp%3B%20If%20you%20provide%20me%20the%20vba%20code%20in%20this%20post%20I'll%20be%20happy%20to%20create%20the%20.xlam%20add-in%20file%20for%20you%20and%20reply%20back%20with%20a%20link%20to%20the%20file%20(along%20with%20some%20instructions).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Randy Roberts
Occasional Visitor

I recently upgraded  from Excel 2002 to Office 365  as 2002 has crashed and I can't find the disks. I was surprised to find my workbooks work well with the new Excel. I am currently challenged with creating a ribbon UI for my macros. I have many VB files stored in the file RMEJMOD.xls. The file is currently stored in a Dropbox folder. The path to this folder is different in the home W7 laptop than the W10 PC at work.  The macros used from this file called from all buttons I created in my workbooks work seamlessly but not in the custom ribbon I created. The path appears when you hover the mouse over the macro name in Customize Ribbon. It appears that the ribbon calls carry the full path to the macro and therefore will not execute when I import the ribbon UI from the other machine even when updating the link location. When the macro is selected I get the popup "Sorry, Excel can't open two workbooks with the same name at the same time."

I could create a ribbon for each machine but I hope there is a better way.

I really need a solution for this as I use at least 2 dozen macros in my workbooks every day.

Any help will be greatly appreciated.

1 Reply
Highlighted

I would suggest storing your macros in an add-in.  This will allow you to access them on both machines.  You will just need to install the add-in on both machines.  An Add-In can store all of your macros and your ribbon interface and allow you the ability to have access to them all of the time.  This would prevent you from having to call the macros from X or Y file path.

 

Here is a basic article about how to create an Add-In

https://trumpexcel.com/excel-add-in/

 

If you want to manipulate/customize the ribbon you'll need the UI Editor  There is also some useful information on Ron's site the involves customizing ribbons.... :

https://www.rondebruin.nl/win/s2/win001.htm

 

 

Another option would be to store your macros in the personal macro workbook and link them to the Quick Access Toolbar (QAT).  This would also allow you to store the macros locally and not have to open or call macros from an .xls file stored in X or Y file path.

 

About the Personal Workbook: https://chandoo.org/wp/using-personal-macro-workbook/

 

If you need additional help converting the macros to an Add-In or Personal Workbook after reviewing the above links please reach back out.  If you provide me the vba code in this post I'll be happy to create the .xlam add-in file for you and reply back with a link to the file (along with some instructions).

 

 

Related Conversations
Insert an image in Excel header
mat74 in Excel on
1 Replies
DAX Powerpivot - How to solve this problem in PowerPivot
kayyeah11 in Excel on
0 Replies
IF statements and conditional formatting
clare1981 in Excel on
1 Replies
Reverse numbers and characters in worksheet
David_Gerrior in Excel on
1 Replies
Sumifs
Jsbluemoon82 in Excel on
4 Replies
Excel formula similiar to texjoin
Carlo74 in Excel on
1 Replies