UserForm Vba code for multiple Workbooks

sharadram1989

New Member
Joined
Nov 9, 2015
Messages
4
Hi there,

I've tried searching of ways to do this but have not found a way.

I'm fairly new to VBA too, so please be patient if this has already something you've broken your heads over :)

Your help would be much appreciated!

The problem: I have data for over 100 headers, so when it comes to finding a particular header, I'm having to use the find/search function to find the particular header within the sheet or scroll across the sheet. Find search involves typing out the entire headers, which sometimes becomes tedious.

My possible solution: Was to create a Userform that has a comboBox control where you can pick the header you want from a dropdown list of headers and place a command button in the userform window which will then search this header in the relevant sheet and cells.

I know that in order for the userform to function in that particular workbook you have to input

Private Sub Workbook_Open()
"Your Userform Name".Show
End Sub


My burning question is: Is there a way of making my userform function accessible in different excel workbooks? I have many excel workbooks with these headers. So will be super handy just to press a shortcut to activate the userform function and it'll enable me to search for my header.

I have created and saved this Userform function in my PersonalVBA sheet in the hope that this can be done?

Do I have to go into each individual workbook and type the "userform.show" function?

Or is it a case that I've tried to reinvent the wheel and should just stick to the find search method?


Thanks in advance for your suggestions!

Sharad
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Thanks Alot Alphafrog. I'll try doing that instead.

How do I add it/ import it in? Is it a case of adding it in via the add in facility under the developer tab? Or some way else?

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top