- Public Sub Workbook_Open(OldRoot As Object,NewRoot As Object,Excel As SpreadsheetGear.Windows.Forms.WorkbookView)
- Excel.GetLock()
- AW = Excel.ActiveWorkbook
- Range = AW.ActiveWorksheet.Range
- Excel.ReleaseLock()
- AddHandler Excel.RangeSelectionChanging, Sub(s2 As Object, e2 As SpreadsheetGear.Windows.Controls.RangeSelectionChangingEventArgs)
- if e2.RangeSelection.Locked = true then
- e2.Cancel = True
- end if
- End Sub
- End Sub'打开时执行事件
复制代码
选择只读单元格后会返回原选择的单元格。
|
|
快表帝国客服