Roopher
Board Regular
- Joined
- Jul 8, 2008
- Messages
- 73
Hello!
Using Excel XP SP2, I wrote VBA that does a ws.Copy which works fine (copy a hidden template worksheet within a workbook). When I tried to run the VBA on three (professionally administrated) company Excel XP SP3 machines, the very ws.Copy line of the code caused the sub to bail out with no error message at all. Also, the ws.Copy method into a new workbook (meant as a data export feature) does not run - the same symptom.
Trying to pin down the problem, I manually recorded a simple macro from a clean workbook as follows:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 08/07/2008 by ME
'
ActiveCell.FormulaR1C1 = "Hello Friends!"
Range("B5").Select
Sheets("Sheet1").Select
Sheets("Sheet1").Copy Before:=Sheets(2)
MsgBox "Finished!"
End Sub
Under the Excel XP SP3 machine, the manual execution of the steps (when actually recording the macro) works. But when I run the macro itself, on the line with "Sheets("Sheet1").Copy Before:=Sheets(2)" the macro just exits with no error message or other anomalies. It simply exits (thats probably why I found nothing in Google or the Forum Search). Anyone has got an idea on this behaviour? Again, on the Excel XP SP2 system it runs through as expected.
Roopher
Using Excel XP SP2, I wrote VBA that does a ws.Copy which works fine (copy a hidden template worksheet within a workbook). When I tried to run the VBA on three (professionally administrated) company Excel XP SP3 machines, the very ws.Copy line of the code caused the sub to bail out with no error message at all. Also, the ws.Copy method into a new workbook (meant as a data export feature) does not run - the same symptom.
Trying to pin down the problem, I manually recorded a simple macro from a clean workbook as follows:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 08/07/2008 by ME
'
ActiveCell.FormulaR1C1 = "Hello Friends!"
Range("B5").Select
Sheets("Sheet1").Select
Sheets("Sheet1").Copy Before:=Sheets(2)
MsgBox "Finished!"
End Sub
Under the Excel XP SP3 machine, the manual execution of the steps (when actually recording the macro) works. But when I run the macro itself, on the line with "Sheets("Sheet1").Copy Before:=Sheets(2)" the macro just exits with no error message or other anomalies. It simply exits (thats probably why I found nothing in Google or the Forum Search). Anyone has got an idea on this behaviour? Again, on the Excel XP SP2 system it runs through as expected.
Roopher
Last edited: