T
Trainer
I have inherited a spreadsheet which was originally created in XP and have
now converted to 2007. I have a column of dates which have suddenly changed
to general format. I've tried re-formatting them but they just won't change
to date format. I've found that it has the following macro. Is there
something that should be changed?
Sub CreateDistributionForm()
'
' CreateDistributionForm Macro
' Macro recorded and updated by MONUC-HQ-ADC COS
'
' Keyboard Shortcut: Ctrl+Shift+F
'
idRow = ActiveCell.Row
With Worksheets("Incoming")
txtNum = Cells(idRow, 1).Value
txtRef = Cells(idRow, 2).Value
txtDate = Cells(idRow, 3).Value
txtSubject = Cells(idRow, 4).Value
txtFrom = Cells(idRow, 5).Value
End With
Worksheets("DistributionForm").Select
Range("E2").Value = txtNum
Range("A31").Value = txtRef
Range("A30").Value = txtDate
Range("D30") = txtSubject
Range("A32") = txtFrom
Range("A4") = Date
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Worksheets("Incoming").Select
End Sub
now converted to 2007. I have a column of dates which have suddenly changed
to general format. I've tried re-formatting them but they just won't change
to date format. I've found that it has the following macro. Is there
something that should be changed?
Sub CreateDistributionForm()
'
' CreateDistributionForm Macro
' Macro recorded and updated by MONUC-HQ-ADC COS
'
' Keyboard Shortcut: Ctrl+Shift+F
'
idRow = ActiveCell.Row
With Worksheets("Incoming")
txtNum = Cells(idRow, 1).Value
txtRef = Cells(idRow, 2).Value
txtDate = Cells(idRow, 3).Value
txtSubject = Cells(idRow, 4).Value
txtFrom = Cells(idRow, 5).Value
End With
Worksheets("DistributionForm").Select
Range("E2").Value = txtNum
Range("A31").Value = txtRef
Range("A30").Value = txtDate
Range("D30") = txtSubject
Range("A32") = txtFrom
Range("A4") = Date
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Worksheets("Incoming").Select
End Sub