Ignore shift on open

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,257
I want to add a control so depsite the user holding down the shift ket, macros still run (assuming macros are enabled of course)!


This article indeed does this:




However it mentions this code needs to be added in the Ribbon module:


Rich (BB code):
Sub customUI******(ribbon As IRibbonUI)

    ThisWorkbook.CheckShiftOnOpen

End Sub


Is that the module call RibbonX_Code in FUNCRES.XLAM?


I added the code there saved the workbook, closed it down, opened it but that code is not there anymore.


How can I "make it travel" with my workbook?


Thanks
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

jkpieterse

Well-known Member
Joined
Dec 3, 2007
Messages
1,070
The customUI code is a callback which goes into any "normal"module (Insert, Module) of the file to which you also need to add RibbonX XML code using a tool called the OfficeUIEditor.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,350
Messages
5,528,191
Members
409,807
Latest member
nicky736

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top