Lost Ability To Background Edit Data While VBA is Stopped

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,564
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have an unusual question, unusual in that it's based on what could be my imagination.

I have a macro (coded "application") that when executed hits a stop command when a particular situation occurs. That situation is when it tries to access data from a second workbook this is missing. Originally, so I vaguely recall, with the code stopped, I could go to the opened workbook with the missing data and manually enter it, save it, and then resume the code as if there had been no missing information. The code proceeds as though there was never any issue. I am certain I was doing that, but could be wrong. The code does not involve a userform at that point.

Now, when I'm executing my code and I reach that stop initiated when data is missing, I can go to the the missing data workbook, but I can no longer enter any information in the cells. It exhibits similar behaviour as if the worksheet was protected, which I confirm it is not. Cells with validation (lists) work, I can select content, I just can't type in values to any non validated cells.

Is the latter expected behaviour? Or should I be able to do what I thought I had been doing (second paragraph)? If this is doable, what could I have unintentionally done to suddenly lose that function?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I think what you are doing should work. Do you have a UserForm displayed when you hit the Stop command?
 
Upvote 0
This sounds like the Userform ShowModal setting is set to True, which would prevent the editing of data. If you set it to False, it will likely work the way you had expected.
 
Upvote 0
Solution
Thanks folks.
I don't have a userform active at the time. I do have a userform in my application, but it's not visible at the time.
Are you suggesting if I set that userform's ShowModal feature to false it should go back to normal, even if the userform isn't active?
 
Upvote 0
Thank you all. That was the solution to set ShowModal to False. I didn't think that had any bearing on the workbook unless that particular form was active. Now I know!
 
Upvote 0
If the form isn't active I don't think it should matter.

A modal form is the default, and means that when the form is up, the user cannot interact with any part of Excel except for that form. If the form is not modal (i.e., modeless) the user can do anything at all while the form is up.

You should normally leave the forms as modal unless you have a good reason to do otherwise. A modeless form will allow the user to do things that could break assumptions in the code supporting the form.

I do not understand why you were having this problem if the form was not even being displayed, but glad you have a solution.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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