When you use Visual Basic for Applications (VBA) in Microsoft Dynamics GP and in Microsoft Business Solutions – Great Plains 8.0 to automatically expand a scrolling window (also known as a grid in VBA), you receive the following error message:

Run-time error '1008': Unsafe Operation. An attempt was made to set a value into an application field which is disabled. This operation could compromise the integrity of the application.


This error occurs if the visible icon for expanding the scrolling window is a non-editable visual switch field that only contains an image. VBA does not allow for the value of a non-editable field to be changed.


To resolve this problem, use a hidden push button field that is overlaid with the same size and position as the visual switch icon field.

For more information about how to add a hidden field, click the following article number to view the article in the Microsoft Knowledge Base:

951230 How to add a hidden field with Visual Basic for Applications in Microsoft Dynamic GP

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!