I wrote a macro about a year ago that worked just fine. I've had some upgrades to Excel since then and now it doesn't work.
I've debugged the problem to this. Here is the code.
Set Dest = Application.InputBox(prompt:="Where do you want the value pasted?" & Chr(10) & Chr(10) & "Rounded numbers will be pasted as values, and cannot be undone.", Title:="Select Destination", Type:=8)
Sheets("temp sigfig sheet").Activate
Range("A1").Activate
Range(Selection, Selection.End(xlDown)).Copy
Sheets(tempsheet).Activate
Dest.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Worksheets("temp sigfig sheet").Delete
Info - tempsheet is the Worksheet name where I want the values pasted. It is different than "temp sigfig sheet".
I have dimensioned Dest as a Range.
The values to copy/paste are located on the "temp sigfig sheet" in a column of varying length starting at "A1".
If I run the macro from an Excel workbook, it pastes the values on the "temp sigfig sheet". Not what I want. I want them on tempsheet.
If I set a Breakpoint in the macro at the first line above, then run the macro and continue from the Debugger after it stops, it correctly pastes the values on the tempsheet Worksheet.
Any idea what the problem is? I have run this on a different computer (newer) and it works fine. Is there an update I need?
I've debugged the problem to this. Here is the code.
Set Dest = Application.InputBox(prompt:="Where do you want the value pasted?" & Chr(10) & Chr(10) & "Rounded numbers will be pasted as values, and cannot be undone.", Title:="Select Destination", Type:=8)
Sheets("temp sigfig sheet").Activate
Range("A1").Activate
Range(Selection, Selection.End(xlDown)).Copy
Sheets(tempsheet).Activate
Dest.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Worksheets("temp sigfig sheet").Delete
Info - tempsheet is the Worksheet name where I want the values pasted. It is different than "temp sigfig sheet".
I have dimensioned Dest as a Range.
The values to copy/paste are located on the "temp sigfig sheet" in a column of varying length starting at "A1".
If I run the macro from an Excel workbook, it pastes the values on the "temp sigfig sheet". Not what I want. I want them on tempsheet.
If I set a Breakpoint in the macro at the first line above, then run the macro and continue from the Debugger after it stops, it correctly pastes the values on the tempsheet Worksheet.
Any idea what the problem is? I have run this on a different computer (newer) and it works fine. Is there an update I need?