- Joined
- Jan 22, 2017
- Messages
- 20
- Reaction score
- 0
From Linked In I export my connections to a .csv file and then format it using the macro below. I then save the file as a Macro Enabled Worksheet. I find that, after saving, the worksheet is in Manual Recalc mode. I would like to add a section to the attached Macro which changes the recalc method to Automatic. Is this doable and can someone show me how the Macro should be changed to reflect that? Thank you very much for your assistance.
Sub FormatLinkedInExportFile()
'
' FormatLinkedInExportFile Macro
' Format Linked In Export File
'
' Keyboard Shortcut: Ctrl+Shift+F
'
Dim LastRow As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Columns("I:AC").Select
Selection.Delete Shift:=xlToLeft
Columns("B:K").Select
ActiveWorkbook.Worksheets("linkedin_connections_export_mic").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("linkedin_connections_export_mic").Sort.SortFields. _
Add Key:=Range("D1" & LastRow), SortOn:=xlSortOnValues, Order:=xlAscending, _
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("linkedin_connections_export_mic").Sort
.SetRange Range("B1:K" & LastRow)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Selection.Columns.AutoFit
Columns("A:A").Select
Selection.ColumnWidth = 0.42
Columns("B:B").ColumnWidth = 9.29
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Selection.ColumnWidth = 24.57
Columns("D").Select
Selection.Delete Shift:=xlToLeft
Selection.ColumnWidth = 30.29
Columns("E:F").Select
Selection.Delete Shift:=xlToLeft
Selection.ColumnWidth = 52.86
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=1
Selection.ColumnWidth = 48.14
ActiveWindow.SmallScroll ToRight:=-5
End Sub
Sub FormatLinkedInExportFile()
'
' FormatLinkedInExportFile Macro
' Format Linked In Export File
'
' Keyboard Shortcut: Ctrl+Shift+F
'
Dim LastRow As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Columns("I:AC").Select
Selection.Delete Shift:=xlToLeft
Columns("B:K").Select
ActiveWorkbook.Worksheets("linkedin_connections_export_mic").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("linkedin_connections_export_mic").Sort.SortFields. _
Add Key:=Range("D1" & LastRow), SortOn:=xlSortOnValues, Order:=xlAscending, _
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("linkedin_connections_export_mic").Sort
.SetRange Range("B1:K" & LastRow)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Selection.Columns.AutoFit
Columns("A:A").Select
Selection.ColumnWidth = 0.42
Columns("B:B").ColumnWidth = 9.29
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Selection.ColumnWidth = 24.57
Columns("D").Select
Selection.Delete Shift:=xlToLeft
Selection.ColumnWidth = 30.29
Columns("E:F").Select
Selection.Delete Shift:=xlToLeft
Selection.ColumnWidth = 52.86
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
ActiveWindow.LargeScroll ToRight:=1
Selection.ColumnWidth = 48.14
ActiveWindow.SmallScroll ToRight:=-5
End Sub