PDA

View Full Version : [SOLVED:] Is there a way to insert a permanent VBA userform to excel



cbao97
02-24-2021, 04:02 AM
Hello all,

As my title. Is there anyways to install it to excel instead of the workbook. I don't have to re-import it when opening the new excel file.

Thank you for your help

SamT
02-24-2021, 09:56 AM
Place it in "Personal.xlsm"
If you don't yet have a Personal.*, record a macro and store it in Personal Macro Workbook, then import the form and delete the macro. Edit the Form to work on the "Active" Workbook.

I would also add code like, "If ActiveWorkbook is Me Then Exit Form", to the Form

Paul_Hossler
02-24-2021, 10:15 AM
What SamT said


I have a number of 'general purpose' Userforms, Modules, and Classes in my Library.xlsm and Personal.xlsm which are save in my XLSTART folder as hidden workbooks (loaded every time, but not visible)

You can drag and drop from those 'building block' files to a new workbook

28004

Bob Phillips
02-24-2021, 11:17 AM
If you save it as an addin, it is by default not visible. This is my preferred approach, I have a personal development addin with lots of useful functions et al like Paul, and with ribbon groups that I add to the Developer tab.

cbao97
02-24-2021, 07:31 PM
Thank you all.


I found a perfect solution. Add UserForm as the icon in the Developer tab


https://excellencemadeeasy.com/2010/09/14/customize-excel-ribbon-and-make-your-macros-default-commands-2/