I am trying to run a very large Excel 2007 VBA program on a Windows Server 2008 r2. For some reason I am not able to rename.
I thought that it was a problem of other activity in the server that was affecting my program. So I used a loop. The following is a snipet of the code that I have tried. Unfortunately, that didn't work.
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1
Dim Newname As String
Newname = Range("b1").Value
Application.DisplayAlerts = False
Do While ActiveWorkbook.Name = "Target.xls"
On Error Resume Next
ActiveWorkbook.SaveAs Filename:= _
"F:\Shared Files\SALES\XYZ Reports\" & Newname & "WXY", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
If ActiveWorkbook.Name = "Target" Then