I have created some code to convert code from text to numbers. I run the code without any issues however after saving and closing the file an VBA changes that were implemented by the code are not saved??? This also happens after manual deletion of rows. I delete the rows, save the workbook and close it, only to find upon re-opening that the changes have not been saved???
Code as follows;
Option Explicit
Sub ConvertToNumbers()
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
Do Until ActiveCell.Value = ""
ActiveCell.Value = CLng(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
Loop
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
ActiveWorkbook.Save
End Sub
Code as follows;
Option Explicit
Sub ConvertToNumbers()
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Application.ScreenUpdating = False
Do Until ActiveCell.Value = ""
ActiveCell.Value = CLng(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
Loop
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
ActiveWorkbook.Save
End Sub