office-2007

How to lock Excel cells in VBA?

旧城冷巷雨未停 提交于 2019-11-26 18:42:19
问题 I have an Excel worksheet that acts like an application, with form control buttons allowing users to 'navigate' through records. First, Previous, Next & Last cycle appropriately through one of the worksheets records, displaying the values in my 'form' worksheet. When users are not in Edit or Add Mode, I would like to lock the cells to prevent users from modifying contents. I tried Range("A1:O24").Locked = True, but I am still able to type new values into the cells. Anyone know how to

Error accessing COM components

試著忘記壹切 提交于 2019-11-26 17:28:53
I built an add-in for Microsoft Office Word. There isn't an issue using the add-in when Word is ran as Administrator, but when it's not ran as an Administrator, there are two common exceptions accessing Ribbon elements. The first Exception: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.IRibbonUI'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000C03A7-0000-0000-C000-000000000046}' failed due to the following error: could not be found. (Exception from HRESULT: 0x80030002 (STG_E

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine while data export to MS ACCESS

最后都变了- 提交于 2019-11-26 11:48:25
I am beginner in using Microsft.ACE.OLEDB 12.0. I create a Winforms application VS 2010. And create a function for export data grid data to MS Access file. I using Microsoft Oledb for export the data grid data to MS Access file.But i get this error when i try to export the data to ms access. Please see the below image. I also refer the Microsoft.Office 12.0 Object Library in my application. Batch Build Configuration The reference to the Access Interop bits has nothing to do with your exception and Access Interop is not necessary to use the classes in the System.Data.OleDb . The problem arises

Error accessing COM components

怎甘沉沦 提交于 2019-11-26 05:26:24
问题 I built an add-in for Microsoft Office Word. There isn\'t an issue using the add-in when Word is ran as Administrator, but when it\'s not ran as an Administrator, there are two common exceptions accessing Ribbon elements. The first Exception: Unable to cast COM object of type \'System.__ComObject\' to interface type \'Microsoft.Office.Core.IRibbonUI\'. This operation failed because the QueryInterface call on the COM component for the interface with IID \'{000C03A7-0000-0000-C000-000000000046}