Change default path to personal macros

  • Thread starter Thread starter AuthorizedUser
  • Start date Start date
A

AuthorizedUser

Good evening;

I removed MS Office 2002 and installed Office 2003. My assigned macros are
still pointing to Office 10 xlstart instead of Office 11. How do I change
the path so it will find my assigned macros?

Thanks
Phil
 
Tom Ogilvy just posted this from Bernie Deitrick.

=====

Adjust this code posted previously by Bernie Deitrick to replace wrong path
with the right path

JB,

Try running the macro below to change the link from the .xls to the .xla
file. You can also change the path by modifying the code, but as written
this assumes both files are in the same folder.

HTH,
Bernie
MS Excel MVP

Sub RepairUserDefinedButtons3()
Dim CmdBar As CommandBar
Dim i As Integer
On Error GoTo ErrorReading:

For Each CmdBar In CommandBars
For i = 1 To CmdBar.Controls.Count
If CmdBar.Controls(i).BuiltIn = False Then
If InStr(1, CmdBar.Controls(i).OnAction, _
"my-macros.xls") Then
CmdBar.Controls(i).OnAction = _
Replace(CmdBar.Controls(i).OnAction, _
"my-macros.xls", "my-macros.xla")
End If
End If
ErrorReading:
Next i
Next CmdBar
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top