Hi,
I have wrote a very simple macro and it isn't quiet working. What I am trying to do is as follows:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ScreenUpdating = False
Dim mycel As Integer
mycel = ActiveCell
Sheets(1).Range("C:C").Copy
Sheets(1).Range("C:C").PasteSpecial xlPasteValues
Range("mycel").Select
ScreenUpdating = True
End Sub
I think it's just the bit in red that's wrong. If any one can advise it will be appreciated.
Thanks
Matt
I have wrote a very simple macro and it isn't quiet working. What I am trying to do is as follows:
- Store the active cell as a variable to be used later
- Past special values in a column on Saving
- Return to the cell that was active before the macro was run
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ScreenUpdating = False
Dim mycel As Integer
mycel = ActiveCell
Sheets(1).Range("C:C").Copy
Sheets(1).Range("C:C").PasteSpecial xlPasteValues
Range("mycel").Select
ScreenUpdating = True
End Sub
I think it's just the bit in red that's wrong. If any one can advise it will be appreciated.
Thanks
Matt