Hi Jerry,
Thanks again for your quick reply!
There are no macros stored under Microsoft Excel Objects. However I use my personal.xlsb actively and keep a few macros in Module 1. These add up to a 6.378 characters long list and I was hesitant to post them here as I don't know if it would add value to this thread. But as I couldn't find an 'upload file' option - here they are.
If you could find something here that would cause this problem I would be very grateful!
Best regards,
Ronnie
Sub Paste_Formulas()
'
' Keyboard Shortcut: Ctrl+Shift+D
'
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
_______________________________________________________________
Sub Paste_values()
'
' Paste_values Macro
'
' Keyboard Shortcut: Ctrl+Shift+M
'
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
_________________________________________________________________
Sub Paste_Formats()
'
' Paste_Formats Macro
'
' Keyboard Shortcut: Ctrl+Shift+F
'
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub
_________________________________________________________________
Sub Format_numbers()
'
' Format_numbers Macro
'
' Keyboard Shortcut: Ctrl+q
'
Selection.NumberFormat = "#,##0"
End Sub
_________________________________________________________________
Sub Dynamics_format()
'
' Dynamics_format Macro
'
' Keyboard Shortcut: Ctrl+Shift+E
'
Dim iAmountcol As Integer
Dim iDatecol As Integer
iAmountcol = Application.WorksheetFunction.Match("Amount", Range("A2:AA2"), 0)
iDatecol = Application.WorksheetFunction.Match("Posting Date", Range("A2:AA2"), 0)
ActiveSheet.Cells(2, iAmountcol).Select
Selection.EntireColumn.Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.TextToColumns Destination:=Cells(1, iAmountcol), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=False
Selection.NumberFormat = "#,##0.00"
Rows("3:3").Select
ActiveWindow.FreezePanes = True
Lastrow = Range("A" & Rows.Count).End(xlUp).Row
With Range("C1")
.Value = "0"
.Copy
End With
Range(Cells(3, iDatecol), Cells(Lastrow, iDatecol)).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlAdd, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "dd/mm/yy;@"
Application.CutCopyMode = False
Range("C1").ClearContents
Range("A3").Select
Selection.AutoFilter
End Sub
_________________________________________________________________
Sub Hyp_formatting()
'
' Hyp_formatting Macro
'
' Keyboard Shortcut: Ctrl+L
Dim Lastrow As Integer
Dim Toprow As Integer
Dim Endcol As String
'Insert A column and insert formula
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Lastrow = Range("B65536").End(xlUp).Row
Toprow = Range("B1").End(xlDown).Row
Endcol = Mid(Range("B" & Toprow).End(xlToRight).Address, InStr(Range("B" & Toprow).End(xlToRight).Address, "$") + 1, InStr(2, Range("B" & Toprow).End(xlToRight).Address, "$") - 2)
Range("A" & Toprow).Select
ActiveCell.FormulaR1C1 = _
"=IF(ISNUMBER(FIND(""acfg"",RC[1])),IF(LEN(RC[1])-(FIND(""acfg"",RC[1]))=6,2,IF(LEN(RC[1])-FIND(""acfg"",RC[1])>7,IF(ISNUMBER(VALUE(MID(RC[1],FIND(""acfg"",RC[1])+5,FIND("")"",RC[1])-FIND(""acfg"",RC[1])-5))),3,4),1)),0)"
Selection.AutoFill Destination:=Range("A" & Toprow & ":A" & Lastrow)
' Formatting
Range("B" & Toprow).Select
ActiveCell.EntireRow.Select
ActiveWindow.FreezePanes = True
ActiveWindow.DisplayGridlines = False
Range("B" & Toprow - 1).Select
ActiveCell.CurrentRegion.Select
Range("B" & Toprow).Offset(1, 0).Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With
Range("A" & Toprow - 1).Select
ActiveCell.FormulaR1C1 = "a"
Range("B" & Toprow - 1).Select
ActiveCell.FormulaR1C1 = "b"
Selection.AutoFilter
ActiveSheet.Range("$A$" & Toprow - 1 & ":$" & Endcol & "$" & Lastrow).AutoFilter Field:=1, Criteria1:="1"
Range("A" & Toprow - 1 & ":" & Endcol & Lastrow).Select
Range("B" & Toprow).Offset(1, 0).Activate
Selection.Font.Bold = True
ActiveSheet.Range("$A$" & Toprow - 1 & ":$" & Endcol & "$" & Lastrow).AutoFilter Field:=1, Criteria1:="2"
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent5
.TintAndShade = 0.599963377788629
End With
ActiveSheet.Range("$A$" & Toprow - 1 & ":$" & Endcol & "$" & Lastrow).AutoFilter Field:=1, Criteria1:="3"
With Selection.Font
.Name = "Arial"
.FontStyle = "Halvfet"
.Size = 8
End With
ActiveSheet.Range("$A$" & Toprow - 1 & ":$" & Endcol & "$" & Lastrow).AutoFilter Field:=1, Criteria1:="4"
With Selection.Font
.Name = "Arial"
.FontStyle = "Halvfet Kursiv"
End With
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark2
End With
ActiveSheet.Range("$A$" & Toprow - 1 & ":$" & Endcol & "$" & Lastrow).AutoFilter Field:=1
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Range("B" & Toprow).Select
ActiveCell.CurrentRegion.Select
Selection.NumberFormat = "#,##0"
Range("A" & Toprow - 1).Select
ActiveCell.ClearContents
With ActiveSheet.PageSetup
.PrintTitleRows = "$" & Toprow - 1 & ":$" & Toprow - 1
.PrintTitleColumns = ""
End With
End Sub