External links causing another workbook to open

Obewan

Board Regular
Joined
Aug 25, 2021
Messages
68
Office Version
  1. 365
Platform
  1. Windows
I have a macro enabled workbook which I copied all the formulas from another workbook and a couple of macros. I have thoroughly gone through all the formula's and changed all formulas so there should be no links. Every time I open the new workbook it still says I have links. Every time I run one of the macros it opens the old workbook which takes time as it is quite a large file. I tried to install findlinks - FindLink - but couldn't get it to install. Any suggestions?

I have done all the search for [ and xls so I'm pretty sure there are no formulas with external links. Could the macro have a link in it?

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Are you using conditional formatting or cell validation? If you are, inspect them carefully for links. Any links in there are very hard to find or delete unless you know they are there and go looking.
 
Upvote 0
I have tried that but not working. It's weird because even when I open the book and choose not to update links when I run the macro it opens the old book.
 
Upvote 0
...when I run the macro it opens the old book.

That seems like a clue. What happens when you use the VBE to single step through the macro? Can you spot the line of code that causes the old WB to open?
 
Upvote 0
No - maybe you can, here it is:

VBA Code:
Sub FullFormRun()

'

' FullFormRun Macro

'



'

Sheets("F").Select

Columns("I:I").Select

Application.CutCopyMode = False

Selection.TextToColumns Destination:=Range("I1"), DataType:=xlDelimited, _

TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _

Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _

:=Array(1, 1), TrailingMinusNumbers:=True

Selection.NumberFormat = "0.0"

Selection.NumberFormat = "0"

Rows("1:1").Select

Selection.AutoFilter

ActiveSheet.Range("$A$1:$I$2153").AutoFilter Field:=7, Criteria1:="<>0", _

Operator:=xlAnd

ActiveSheet.Range("$A$1:$I$2153").AutoFilter Field:=6, Criteria1:=">0", _

Operator:=xlAnd

Columns("A:I").Select

Range("C1").Activate

Selection.Copy

Sheets("Days").Select

Range("A1").Select

ActiveSheet.Paste

Sheets("F").Select

Application.CutCopyMode = False

Selection.AutoFilter

Sheets("Filter").Select

Columns("A:H").Select

Range("H1").Activate

Selection.ClearContents

Sheets("F").Select

Rows("1:1").Select

Selection.AutoFilter

ActiveSheet.Range("$A$1:$IV$3000").AutoFilter Field:=7, Criteria1:="<>0", _

Operator:=xlAnd

ActiveSheet.Range("$A$1:$IV$3000").AutoFilter Field:=8, Criteria1:="<>F", _

Operator:=xlAnd

Columns("A:H").Select

Selection.Copy

Sheets("Filter").Select

Range("A1").Select

ActiveSheet.Paste

Range("K2").Select

Sheets("F").Select

Selection.AutoFilter

Sheets("Filter").Select

Sheets("Calculations").Select

Rows("1:1").Select

Range("D1").Activate

Selection.AutoFilter

ActiveSheet.Range("$A$1:$V$5000").AutoFilter Field:=7, Criteria1:=">0", _

Operator:=xlAnd

ActiveWindow.SmallScroll ToRight:=4

ActiveSheet.Range("$A$1:$V$5000").AutoFilter Field:=22, Criteria1:="<>0", _

Operator:=xlAnd

ActiveWindow.SmallScroll ToRight:=-4

Columns("B:I").Select

Range("I1").Activate

Selection.Copy

Sheets("Distance").Select

Range("B1").Select

ActiveSheet.Paste

Sheets("Calculations").Select

Application.CutCopyMode = False

Selection.AutoFilter

Sheets("Filter").Select

Sheets("Bet sheet").Select

Rows("2:2").Select

Selection.AutoFilter

ActiveSheet.Range("$A$2:$BY$242").AutoFilter Field:=28, Criteria1:="<>"

Rows("3:243").Select

Selection.Copy

With Sheets("Archive").Range("A" & Rows.Count).End(xlUp).Offset(1)

.PasteSpecial Paste:=xlPasteValuesAndNumberFormats

.PasteSpecial Paste:=xlPasteFormats

Sheets("Bet sheet").Select

Application.CutCopyMode = False

Selection.AutoFilter

Sheets("Formguide").Select



End With

End Sub
 
Last edited by a moderator:
Upvote 0
How are you calling the macro that opens the old workbook?
 
Upvote 0
In that case check that the button is not pointing to the old file.
 
Upvote 0

Forum statistics

Threads
1,215,831
Messages
6,127,137
Members
449,361
Latest member
VBquery757

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