Running macros in Excel 2007
I have just installed Excel 2007 and wish to copy values from one worksheet
(data downloaded from online banking in csv format) to the first blank row in
another. I am manually copying a range of cells in the first worksheet and
then, in the second worksheet, running a macro which includes the code:
Application.ScreenUpdating = False
rownum = 4
Cells(rownum, 1).Select
While Selection.Value < ""
rownum = rownum + 1
Cells(rownum, 1).Select
Wend
ActiveSheet.Paste
.. . . . and then various formatting functions
When I try to run the macro from a UserForm or by selecting it in the list
of macros dialog box, it fails with the message
"Run Time Error 1004 - Paste method of Worksheet class failed"
The macro runs OK from a keyboard shortcut.
I get the same problem if I test it by using Record Macro to create a paste
action and then run the recorded macro.
(Running Vista Home Premium)
Can anyone help please?
|