The syntax allows a change the Alias table on the current active sheet, not only a specific sheetname explicitly named i.e. "Sheet1".
Using; sheetName = ActiveSheet.Name
Custom Ribbon button call:
Option Explicit
'Callback for rxAlias onAction
Sub rxAlias_change(control As IRibbonControl, id As String, index As Integer)
With ActiveSheet.Cells.Interior
Select Case index
Case 0
Sample_SetALIASnone
Case 1
Sample_SetALIASDefault
End With
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Change Alias sub-routine:
'Set ALIAS table(s)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Public Declare Function HypSetAliasTable Lib "HsAddin.dll" (ByVal vtSheetName As Variant, ByVal vtAliasTableName As Variant) As Long
'Set ALIAS table = "Default"
Sub rx_SetALIASnone(control As IRibbonControl)
'Set ALIAS table = "none"
No comments:
Post a Comment