Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Path problem

  Asked By: Marty    Date: Mar 03    Category: MS Office    Views: 740
  

I move my workbook file from folder to another, so i do need to
assign my macro to my icnon on the toolbar each time i move my
workbook.........

Is there a vba code that does this assigning job programatically, so
wherever i move my WB then no need to assign, cuz it is done
automatically...........

*I want a code that makes macro security Low without no interfear
from the user

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Grant Jones     Answered On: Mar 03

This code  assumes you have a custom toolbar
with all your macros linked to control buttons on it:

Set c = CommandBars("NameOfCustomToolbar")

For Each b In c.Controls
strLong = b.OnAction
strShort = Right(strLong, Len(strLong) - InStrRev(strLong, "!"))
b.OnAction = strShort
Next b

c.Visible = True

 
Didn't find what you were looking for? Find more on Path problem Or get search suggestion and latest updates.




Tagged: