J
Jos Vens
Hi,
I have a strange problem.
I have a cell where I put in the formula =Now(). I want then to export that
sheet with fixed values, so first I copy and paste values over the sheet,
then uses the command copy. The strange thing is that the value of the date
(which is changed into a fixed value of type date) is change to somewhere in
the year 2000. What can be the reason?
Thanks Jos Vens
Here is a bit of my code (everything works fine except if there's a date in
the spreadsheet)
Set sTemp = ActiveSheet
sTemp.Name = "mx" & sLijst.Name
Range(sTemp.Cells(1, 1), sTemp.Cells(vRows, vCols)).Copy
Range(sTemp.Cells(1, 1), sTemp.Cells(vRows, vCols)).PasteSpecial
Paste:=xlValues
Range(sTemp.Cells(1, vCols + 1), sTemp.Cells(1100, 255)).Clear
Range(sTemp.Cells(vRows + 1, 1), sTemp.Cells(1100, 255)).Clear
sTemp.[A1].Select
sTemp.Copy 'This line changes the date into another date in the past
Set wbFile = ActiveWorkbook
Set sOutput = ActiveSheet
If (vProtect) Then
sOutput.Protect Password:=vPswDsg, DrawingObjects:=True,
Contents:=True, Scenarios:=True
wbFile.Protect Password:=vPswDsg, Structure:=True, Windows:=False
End If
sOutput.PageSetup.PrintArea = Range(sOutput.Cells(1, 1),
sOutput.Cells(vRows, vCols)).Address
sOutput.Name = vLKLas
wbFile.SaveAs Filename:=vPath & vLKLas & " Lijst.xls"
wbFile.Close
sTemp.Delete
I have a strange problem.
I have a cell where I put in the formula =Now(). I want then to export that
sheet with fixed values, so first I copy and paste values over the sheet,
then uses the command copy. The strange thing is that the value of the date
(which is changed into a fixed value of type date) is change to somewhere in
the year 2000. What can be the reason?
Thanks Jos Vens
Here is a bit of my code (everything works fine except if there's a date in
the spreadsheet)
Set sTemp = ActiveSheet
sTemp.Name = "mx" & sLijst.Name
Range(sTemp.Cells(1, 1), sTemp.Cells(vRows, vCols)).Copy
Range(sTemp.Cells(1, 1), sTemp.Cells(vRows, vCols)).PasteSpecial
Paste:=xlValues
Range(sTemp.Cells(1, vCols + 1), sTemp.Cells(1100, 255)).Clear
Range(sTemp.Cells(vRows + 1, 1), sTemp.Cells(1100, 255)).Clear
sTemp.[A1].Select
sTemp.Copy 'This line changes the date into another date in the past
Set wbFile = ActiveWorkbook
Set sOutput = ActiveSheet
If (vProtect) Then
sOutput.Protect Password:=vPswDsg, DrawingObjects:=True,
Contents:=True, Scenarios:=True
wbFile.Protect Password:=vPswDsg, Structure:=True, Windows:=False
End If
sOutput.PageSetup.PrintArea = Range(sOutput.Cells(1, 1),
sOutput.Cells(vRows, vCols)).Address
sOutput.Name = vLKLas
wbFile.SaveAs Filename:=vPath & vLKLas & " Lijst.xls"
wbFile.Close
sTemp.Delete