Saving/Calling a Module

iflyfr8

New Member
Joined
Dec 18, 2016
Messages
9
Normally, If I create a macro/sub and click the macros button on the developer ribbon I see a list of available macros that are formated as one word. For example, I have macros named: Refresh, GetStats, PositionFill etc.. I can easily assign a shortcut ket to these or call them in a sub routine using "Call GetStats".

However, I have one macro that keeps changing the name to included the file name. 'Open Orders.xlsm'!DailyTrans.DailyTrans I am unable to assign a shortcut key and I cannot figure out how to call it from a sub routine with this format. When the routine was first written it acted normally but something is causing it to change. I have tried copying the contents to a new module and renaming it with no success. Occasionally it will save the conventional way but soon changes back to include the file name.

Does anyone know what is causing this and how to prevent it? Also, what is the syntax to call this routine as saved from a sub routine?

thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I found my own answer but wanted to share as I am not sure how well known this error is. This error occurs when the sub name is the exact same name as the properties name. The fix was to leave the sub routine called DailyTrans and change the name in the properties to DailyTransFill.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top