macro button not responding after first press

jallum

New Member
Joined
Sep 14, 2018
Messages
11
Hi there.
I've go an xlsb workbook that that has a single macro button called "Process Data" on it that opens and copies sheet1 from another workbook into a sheet in the xlsb workbook.
The data in this copied sheet is then processed a row at a time, and creates and saves and closes a new workbook for each row.
Once done a message box opens an tells the user how many new worbooks were created, and if there were any rows outstanding on the sheet that could not create a workbook.
What is happening is if the user then attempts to press the "Process Data" button again to run a new input sheet, there is no response from the button unless they click somewhere else on the worksheet first - it looks like Excel thinks I'm trying to edit the button.
I've cleared the cache and activated the orginal workbook, but that doesn't seem to work.
There are multiple modules and macros in this workbook, so I've just included the main macro that the button controls, as well as the macro that creates and saves the individual workbooks.
 

Attachments

  • main macro.jpg
    main macro.jpg
    121.4 KB · Views: 16
  • wb create.jpg
    wb create.jpg
    105.1 KB · Views: 15

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi Jallam,
might be worth adding a line at the end that activates a cell on the worksheet, ie. Range("A1").Select.
The idea being this will replicate clicking into cell A1.
 
Upvote 0
That's a nice simple solution. And effective. I use that all of the time to reposition the cursor but not idea why I didn't think of it this time.
Thanks for the help rondeondo.
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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