Lost Ability To Background Edit Data While VBA is Stopped

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,352
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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
2,384
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I think what you are doing should work. Do you have a UserForm displayed when you hit the Stop command?
 

Dan_W

Well-known Member
Joined
Jul 11, 2018
Messages
1,335
Office Version
  1. 365
Platform
  1. Windows
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.
 
Solution

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,352
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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?
 

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,352
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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!
 

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
2,384
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
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.
 

Forum statistics

Threads
1,176,080
Messages
5,901,275
Members
434,884
Latest member
ares0027

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
Top