jschipporeit
New Member
- Joined
- Jul 22, 2010
- Messages
- 3
In order to ultimately create a .prn file, I have to format my data in excel as custom, then copy & paste into notepad, then select all, copy & paste back into excel. The whole point of this is to take data formatted as custom (a normal '987654' looks like '00000987654') and get it into excel formatted as text but to keep all the zeros as placeholders.
Everytime my macro reachs ActiveSheet.Paste I get a "Run-time error '1004' Paste method of Worksheet class failed" error. These are very simple but necessary steps. Any guidance with this is GREATLY appreciated! My code is below:
******
Range("A1:A28").Select
Selection.Copy
Application.CutCopyMode = False
Sheets("Sheet3").Select
Range("A1").Select
ActiveSheet.Paste <---error occurs here!
Rows("29:50").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-42
Range("C1").Select
Everytime my macro reachs ActiveSheet.Paste I get a "Run-time error '1004' Paste method of Worksheet class failed" error. These are very simple but necessary steps. Any guidance with this is GREATLY appreciated! My code is below:
******
Range("A1:A28").Select
Selection.Copy
Application.CutCopyMode = False
Sheets("Sheet3").Select
Range("A1").Select
ActiveSheet.Paste <---error occurs here!
Rows("29:50").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-42
Range("C1").Select