Macro runs manually give different result from assigning same macro in click on button

BKChedlia

New Member
Joined
Jun 15, 2016
Messages
41
Dear all,

I developped a VBA code which works perfeclty when I run it via F5.

I tried to add a button and assign the same macro to this button but the final result was different (it's starts processing the code and stopped so result is not complete.)

Can you advice me what to do in this case please ?

Thank you.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
need more info, whats in the macro, is the correct sheet selected when you start it, is the macro stepping out unfinished because of an error
 
Upvote 0
The Macro, create new sheet 2 and copy information from sheet 1.
then it copy all sheet 2 in Word document.

When I click in the button, it copy some of the infromation in sheet 2 (not all as the manual code run do), create the word and copy the same information of sheet 2, no error message.

Do you want me to share the code ?
 
Last edited:
Upvote 0
the code might help, it would help if you can identify from your code where it appears to stop doing what it should do (.i.e. this copy works the next copy dosen't)
 
Upvote 0
post you code between code tags here [CODE ] & [ /CODE]
 
Upvote 0

Forum statistics

Threads
1,223,785
Messages
6,174,540
Members
452,571
Latest member
MarExcelTips

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