0

Try to find out why for days! This is the code:

Sheets("DCF").Select
Columns("H:H").Select
Selection.Copy
Columns("V:V").Select
Selection.Insert Shift:=xlToRight
Range("V6").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=Date_of_Value"
Range("V6").Select
Selection.NumberFormat = "[$-409]mmmm d, yyyy;@"
Columns("V:V").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False

when I hit F8, after line Selection.Insert Shift:=xlToRight, it jump to another macro which is a function. This function is exactly copy from here:
http://exceltipstechniques.blogspot.com/2014/01/how-to-convert-numeric-value-into.html#

I can't figure out why it jump from one macro to another without call.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Piggymum
  • 1
  • 3
  • 4
    Do you have any other code in any events? – braX Jun 10 '21 at 05:26
  • 3
    Are you using the function it jumps to as UDF in any cell in Column V? – Samuel Everson Jun 10 '21 at 05:50
  • You might benefit from reading [How to avoid using Select in Excel VBA](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba). – Pᴇʜ Jun 10 '21 at 06:54
  • 1
    In `SpellNumber` put `Msgbox Application.Caller.Address(external:=true)` that will tell you where it's being called from (assuming it's called from a worksheet somewhere) – Tim Williams Jun 10 '21 at 06:59

0 Answers0