HELP - recorded macro does not run

anaguiu

New Member
Joined
Feb 19, 2002
Messages
22
I have recorded a macro in Excel, however when I try to re-run the macro I get errors. Here is the code:

Workbooks(3).Activate
Sheets("Commentary").Select
Application.GoTo Reference:="R35C3"
Selection.Copy
Workbooks(2).Activate
ActiveWindow.SmallScroll down:=5
ActiveCell.PasteSpecial xlPasteValues


Workbooks(3).Activate
Application.CutCopyMode = True
ActiveSheet.Unprotect
ActiveSheet.Shapes("Group 28").Select
Selection.ShapeRange.Ungroup
ActiveSheet.Shapes("lblInventory").Select
Selection.Verb Verb:=xlOpen
Workbooks(2).Activate
ActiveWindow.SmallScroll down:=5
ActiveCell.Select
ActiveCell.PasteSpecial xlPasteAll

The macro always stops at the last line of code shown above. Is there something wrong with the code?

What I am attempting to do is run a macro to copy text from a textbox in one file to a cell in another file. I have tried various combinations of properties and methods but nothing seems to work. Anyone have any suggestions? Thanks!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,214,653
Messages
6,120,748
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top