picklefactory
Well-known Member
- Joined
- Jan 28, 2005
- Messages
- 506
- Office Version
- 365
- Platform
- Windows
Hi folks. Wonder if anyone can help? I have 2 individual bits of code that do a couple of simple filters and navigation jumps, no problem there, they work just fine. What I then have, is a macro that runs both of them one after the other with a button on the sheet. No problem there either so far, it all works fine up to this point. My problem is that the macro with the button recognises the initial 2 functions with a specific reference to the original workbook I created them in, but I am using that workbook as a master for various projects and saving the entire workbook under a new filepath each time I use the master. Unfortunately, the references to the 2 bits of code are keeping the original label so when I try and run the button macro with the new filepath, it fails to find them. Here is my button macro.
Sub Machinedatafilterandjump()
'
' Machinedatafilterandjump Macro
' Filter plant no's and jump to current tools
'
'
Application.Run "'Project Workbook a.xls'!Filter"
Application.Run "'Project Workbook a.xls'!Title"
End Sub
What I need is for the applications 'Filter' and 'Title' to migrate with the workbook under it's new filepath, whatever that may happen to be.
Does that make any sense to anyone?
Sub Machinedatafilterandjump()
'
' Machinedatafilterandjump Macro
' Filter plant no's and jump to current tools
'
'
Application.Run "'Project Workbook a.xls'!Filter"
Application.Run "'Project Workbook a.xls'!Title"
End Sub
What I need is for the applications 'Filter' and 'Title' to migrate with the workbook under it's new filepath, whatever that may happen to be.
Does that make any sense to anyone?